Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.20.1
-
None
Description
Current function implementation of `concat_delim` is wrong.
select concat_delim(',', 'a', null, 'b') as c
We may want the result of 'a,b', which ignore null value during executing.
But, actual result is 'a,,b'.
I found the similar function(concat_ws) in MySQL and Postgres, and the behavior is what I wish.
@Test public void testConcatDelimVarArgsWithNullValue() throws Exception { testBuilder() .sqlQuery("select concat_delim(',', 'a', null, 'b') as c") .unOrdered() .baselineColumns("c") .baselineValues("a,b") .go(); }