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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to