linehrr opened a new issue #10552:
URL: https://github.com/apache/druid/issues/10552


   ### Affected Version
   0.17.0
   
   ### Description
   in the older druid version(as we tested 0.12.0) when a dimension is null, it 
will still be in the query result like this: 
   
   query:
   
   > {
   >             "dataSource": "stats",
   >             "queryType": "groupBy",
   >             "intervals": 
"2020-10-03T00:00:00-04:00/2020-10-03T23:59:59-04:00",
   >             "granularity": { "type": "period", "period": "P1D", 
"timeZone": "America/Toronto" },
   >             "dimensions": ["segments"],
   >             "aggregations": [{ "fieldName": "Impressions", "name": "imp", 
"type": "longSum" },{ "fieldName": "Clicks", "name": "Clicks", "type": 
"longSum" },{ "fieldName": "PageVisit1", "name": "pv1", "type": "longSum" },{ 
"fieldName": "PageVisit3", "name": "pv3", "type": "longSum" },{ "fieldName": 
"ViewConversions", "name": "act_view", "type": "longSum" },{ "fieldName": 
"ClickConversions", "name": "act_click", "type": "longSum" }],
   >             "retainMissingValue": true,
   >             "replaceMissingValueWith": null,
   >             "filter": {
   >                         "type":"and",
   >                         "fields": [
   >                                     { "type":"in", "dimension":"StatsID", 
"values": [123] }
   >                                     
   >         
   >                         ]
   >             }
   >         }
   
   we used 
   > "retainMissingValue": true,
   >             "replaceMissingValueWith": null
   
   however this does not seem to work on new druid, it still returns nothing 
when a dimension is null. 
   
   > [
   >     {
   >         "version": "v1",
   >         "timestamp": "2020-10-03T00:00:00.000-04:00",
   >         "event": {
   >             "pv1": 0,
   >             "Clicks": 53,
   >             "pv3": 0,
   >             "act_click": 0,
   >             "segments": null,
   >             "imp": 58217,
   >             "act_view": 1
   >         }
   >     }
   > ]
   we can see "segments": null, this is indicating that dimension is null all 
across the date range we are querying. 
   
   new druid(0.17.0):
   
   > [
   >     {
   >         "version": "v1",
   >         "timestamp": "2020-10-03T00:00:00.000-04:00",
   >         "event": {
   >             "pv1": 0,
   >             "Clicks": 53,
   >             "pv3": 0,
   >             "act_click": 0,
   >             "imp": 58217,
   >             "act_view": 1
   >         }
   >     }
   > ] 
   
   now segments field totally disappeared. which is not consistent with the 
older druid behaviour. 
   
   


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to