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-591702177 I think you're right that them reducing to the same expression has something to do with the error. Fwiw, in the SQL standard, `CASE X WHEN NULL` is _always_ false for _any_ X. Calcite detects that and just replaces it with the `ELSE` path (it doesn't care what X is, nor should it). For your case, you should just replace `CASE X WHEN NULL THEN ... ELSE ... END` with `CASE WHEN X IS NULL THEN ... ELSE ... END`, and then you should get the behavior you're looking for. Separately, we need to fix this bug, but when we do, it will just mean that the `ELSE` path is (correctly) always taken.
---------------------------------------------------------------- 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]
