[ 
https://issues.apache.org/jira/browse/HIVE-14918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15560316#comment-15560316
 ] 

Pengcheng Xiong commented on HIVE-14918:
----------------------------------------

[~wisgood], i tried on current master, it is working fine. If you have problem 
on 2.1, maybe we should backport some patches.
{code}
hive> create table d (c1 string, c2 string, c3 string);
OK
hive> FROM src INSERT OVERWRITE TABLE d SELECT 'abc', 'xyz', '8675309' WHERE 
src.key = 86;
Query ID = pxiong_20161009101753_605845db-aeb9-4dab-87d6-5ad51fab1f79
Total jobs = 1
hive> select * from d;
OK
abc     xyz     8675309
Time taken: 0.127 seconds, Fetched: 1 row(s)
hive> SELECT concat_ws('.',NULL) FROM d;
OK

Time taken: 0.096 seconds, Fetched: 1 row(s)
{code}

And also, a rewritten query also works fine
{code}
hive> SELECT concat_ws('.',NULL) FROM (SELECT 'abc', 'xyz', '8675309' from src 
WHERE src.key = 86)subq;
OK

Time taken: 0.272 seconds, Fetched: 1 row(s)
{code}


> Function concat_ws get a wrong value  
> --------------------------------------
>
>                 Key: HIVE-14918
>                 URL: https://issues.apache.org/jira/browse/HIVE-14918
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 1.1.1, 2.0.0, 2.1.0, 2.0.1
>            Reporter: Xiaowei Wang
>            Assignee: Xiaowei Wang
>            Priority: Critical
>             Fix For: 2.1.0
>
>         Attachments: HIVE-14918.0.patch
>
>
> FROM src INSERT OVERWRITE TABLE dest1 SELECT 'abc', 'xyz', '8675309'  WHERE 
> src.key = 86; 
> SELECT concat_ws('.',NULL)  FROM dest1 ;
> The result is a empty  string "",but I think it should be return NULL .



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to