I am trying to run the following query:
{
"queryType": "groupBy",
"dataSource": "wikipedia",
"intervals": [
"2015-11-15/2015-11-18"
],
"granularity": "all",
"aggregations": [
{
"name": "count",
"type": "doubleSum",
"fieldName": "count"
}
],
"dimensions": [
{
"type": "default",
"dimension": "country",
"outputName": "Country"
}
],
"limitSpec": {
"type": "default",
"columns": [
{
"dimension": "count",
"direction": "descending"
}
]
},
"having": {
"type": "or",
"havingSpecs": [
{
"type": "equalTo",
"aggregation": "Country",
"value": "USA"
},
{
"type": "lessThan",
"aggregation": "count",
"value": 100
}
]
}
}
And I am getting an error of:
{
"error" : "Can not construct instance of java.lang.Number from String value 'USA': not a valid number\n at [Source: HttpInputOverHTTP@78359cf4; line: 1, column: 611] (through reference chain: java.util.ArrayList[0])"
}
Which is obviously incorrect since everyone knows that Number('USA') == 1
But seriously it would be great to have having filters be able to work on string columns as well. (without resorting to a nested groupBy)
I am trying to run the following query:
{ "queryType": "groupBy", "dataSource": "wikipedia", "intervals": [ "2015-11-15/2015-11-18" ], "granularity": "all", "aggregations": [ { "name": "count", "type": "doubleSum", "fieldName": "count" } ], "dimensions": [ { "type": "default", "dimension": "country", "outputName": "Country" } ], "limitSpec": { "type": "default", "columns": [ { "dimension": "count", "direction": "descending" } ] }, "having": { "type": "or", "havingSpecs": [ { "type": "equalTo", "aggregation": "Country", "value": "USA" }, { "type": "lessThan", "aggregation": "count", "value": 100 } ] } }And I am getting an error of:
{ "error" : "Can not construct instance of java.lang.Number from String value 'USA': not a valid number\n at [Source: HttpInputOverHTTP@78359cf4; line: 1, column: 611] (through reference chain: java.util.ArrayList[0])" }Which is obviously incorrect since everyone knows that
Number('USA') == 1But seriously it would be great to have having filters be able to work on string columns as well. (without resorting to a nested groupBy)