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/02/26 23:03:47 UTC

[GitHub] [druid] gianm commented on issue #9412: Regression: SQL query with multiple similar CASE clauses cannot be translated to correct native json format

gianm commented on issue #9412: Regression: SQL query with multiple similar CASE clauses cannot be translated to correct native json format
URL: https://github.com/apache/druid/issues/9412#issuecomment-591689543
 
 
   To be clear, the query @clintropolis is the correct way to write what you're trying to write. Starting in Druid 0.17.0 it (correctly) recognizes that `CASE cityName WHEN NULL THEN FALSE ELSE TRUE END AS col_a` is always true, because `NULL` does not equal `NULL`, so even if `cityName` is NULL, it still shouldn't go down the `WHEN NULL` path.
   
   PostgreSQL would do the same thing (I just tested it to double-check).
   
   There is a bug, though, where the SQL planner is trying to create two virtual columns with the same name. We'll need to fix that. But it shouldn't block you, @sascha-coenen, because you should adjust your query to the variant @clintropolis suggested anyway (it's better aligned with how SQL works, and should be effective in 0.17.0 and all future versions).

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