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 2020/06/03 14:21:16 UTC

[GitHub] [druid] suneet-s opened a new issue #9980: inner join condition on numeric column matching null behaves differently than string key matching null

suneet-s opened a new issue #9980:
URL: https://github.com/apache/druid/issues/9980


   ### Affected Version
   
   0.19
   
   ### Description
   
   See the following query
   
   ```
   select f.m1, w.floatDim, w.key, w.longDim, stringDimExt, sum(doubleDim) as dd from druid.foo f inner join index.windex w on f.m1 is null
   group by 1,2, 3, 4, 5
   having (w.key = '6' or f.m1 > 1) and dd > 0
   ```
   
   Druid plans this query and it returns no results. Changing the condition to `is not null` returns what appears to be all results.
   Looking at the explain plan for the query, it appears that Calcite optimizes this join condition to false / true respectively.
   
   This behavior is different than using a string column in the join condition.
   
   ```
   select f.m1, w.floatDim, w.key, w.longDim, stringDimExt, sum(doubleDim) as dd from druid.foo f inner join index.windex w on f.m1 is null
   group by 1,2, 3, 4, 5
   having (w.key = '6' or f.m1 > 1) and dd > 0
   ```
   
   dim1 is a key column and this query throws an ISE


----------------------------------------------------------------
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



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