When using both subtotalsSpec and a filter on a renamed dimension, no results are returned.
Affected Version
Druid 0.14.0
Description
All 3 of the following need to be true to encounter the bug:
- The dimension needs to have renamed
- There needs to be a filter on any dimension, I have tested both the queried dimension and a completely separate dimension
- There must be a subtotalsSpec.
And example query looks like this:
{
"queryType": "groupBy",
"dataSource": "some_awesome_table",
"granularity": "all",
"dimensions": [
{
"type":"default",
"dimension":"country",
"outputName":"country_name"
}
],
"filter": {
"type": "selector",
"dimension": "country",
"value": "ZA"
},
"aggregations": [
{
"type": "count",
"name": "count"
}
],
"subtotalsSpec": [["country_name"], []],
"intervals": [
"2019-05-28T00:00:00Z/2019-05-29T00:00:00Z"
],
"context": {
"useCache": false,
"populateCache": false,
"useResultLevelCache": false,
"populateResultLevelCache": false
}
}
This query will return [].
If you remove the filter or the subtotalsSpec or make the "outputName" the same as the dimension, results are returned. Using "bySegment: true" in context also returns results.
On a hunch it may have to do with a single result, I have also tested an or filter, and it still returns no results.
When using both subtotalsSpec and a filter on a renamed dimension, no results are returned.
Affected Version
Druid 0.14.0
Description
All 3 of the following need to be true to encounter the bug:
And example query looks like this:
This query will return
[].If you remove the filter or the subtotalsSpec or make the "outputName" the same as the dimension, results are returned. Using "bySegment: true" in context also returns results.
On a hunch it may have to do with a single result, I have also tested an
orfilter, and it still returns no results.