You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/06/03 06:57:35 UTC

[GitHub] [incubator-druid] nrwiersma opened a new issue #7820: subtotalsSpec and filtering returns no results

nrwiersma opened a new issue #7820: subtotalsSpec and filtering returns no results
URL: https://github.com/apache/incubator-druid/issues/7820
 
 
   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.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org