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 22:18:36 UTC

[GitHub] [druid] gianm commented on issue #9416: COALESCE does NOT work with empty strings as documentation states it would

gianm commented on issue #9416: COALESCE does NOT work with empty strings as documentation states it would
URL: https://github.com/apache/druid/issues/9416#issuecomment-591673574
 
 
   In default null-handling mode (https://druid.apache.org/docs/latest/querying/sql.html#null-handling-modes) there are some inconsistencies with nulls vs empty string handling that we are unable to repair while maintaining SQL compliance.
   
   I think probably the most likely thing we'll do here is change the docs to be SQL compliant, i.e. "returns the first non-NULL value". I suppose if you wanted to treat nulls and empty strings equivalently you could do `COALESCE(NULLIF(expr1, ''), NULLIF(expr2, ''), ...)` or something like that.

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