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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
