[ 
https://issues.apache.org/jira/browse/DRILL-8222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Turton updated DRILL-8222:
--------------------------------
    Fix Version/s: 1.21.0
                       (was: 1.20.2)

> Wrong function's implementation of concat_delim
> -----------------------------------------------
>
>                 Key: DRILL-8222
>                 URL: https://issues.apache.org/jira/browse/DRILL-8222
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>    Affects Versions: 1.20.1
>            Reporter: Xurenhe
>            Priority: Major
>             Fix For: 1.21.0
>
>         Attachments: image-2022-05-11-19-07-28-586.png
>
>
> Current function implementation of `concat_delim` is wrong.
> {code:java}
> select concat_delim(',', 'a', null, 'b') as c {code}
> 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.
>  
> ----
>  
> {code:java}
> @Test
> public void testConcatDelimVarArgsWithNullValue() throws Exception {
>   testBuilder()
>     .sqlQuery("select concat_delim(',', 'a', null, 'b') as c")
>     .unOrdered()
>     .baselineColumns("c")
>     .baselineValues("a,b")
>     .go();
> }
> {code}
> !image-2022-05-11-19-07-28-586.png|width=576,height=218!
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to