sascha-coenen opened a new issue #9416: COALESCE does NOT work with empty 
strings as documentation states it would
URL: https://github.com/apache/druid/issues/9416
 
 
   ### Affected Version
   0.16.0 and 0.17.0
   
   ### Description
   
   COALESCE does NOT work with empty strings
   
   ```
   SELECT
      COALESCE('something', 'fallback') AS tst1,   
      COALESCE(null, 'fallback') AS tst2,
      COALESCE('', 'fallback') AS tst3
   ```
   this yields
   "something", "fallback", ""
   
   According to the documentation, the third projection should also yield the 
output "fallback"
   > COALESCE(value1, value2, ...) | Returns the first value that is neither 
NULL nor empty string.
   
   I would petition to keep the documentation as is and modify the function 
behaviour to be conformant to the documentation as it would be quite useful if 
COALESCE could also deal with empty strings.
   
   
   
   
   

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