Using javascript function on dimension

Hi,

I am facing Null pointer Exception while using javaScript function on dimension.

Below in my druid Query:

{

“queryType”: “select”,

“dataSource”: “test”,

“granularity”: “all”,

“intervals”: [

"2019-03-15T00:02:00.000Z/2019-03-15T00:17:00.000Z"

],

“dimensions”: [

{

"type" : "default",

"dimension" : "test_P_10",

"outputName" : "test_P_10",

"outputType" : "STRING"

},{

"type" : null,

"dimension" : "COUNTER_GROUP_ID",

"outputName" : null,

"extractionFn" : null

},{

  "type": "javascript",

  "outputName": "Target",

  "function": "function(test_P_10) { return test_P_10 + 'amit' ; }"

}

],

“metrics”: [

"test_C_5"

],

“pagingSpec”: {

"pagingIdentifiers": {},

"threshold": 10000

}

}

Below is the error i am facing :

{

“error” : “Unknown exception”,

“errorMessage” : null,

“errorClass” : “java.lang.NullPointerException”,

“host” : “xx.xx.xx.xx:8083”

}

Please Help.

Can someone please help me on this.