spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cheng Hao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-8240) string function: concat
Date Fri, 14 Aug 2015 04:45:46 GMT

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

Cheng Hao commented on SPARK-8240:
----------------------------------

It works for me like:
{code}
sql("select concat('a', ',', key, ',', value) from src").collect()
{code}
or
{code}
df.select(concat($"a", lit(","), $"b")),
df.select(concat($"a", lit(","),$"b", lit(","),$"c"))
{code}


> string function: concat
> -----------------------
>
>                 Key: SPARK-8240
>                 URL: https://issues.apache.org/jira/browse/SPARK-8240
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Reynold Xin
>            Assignee: Reynold Xin
>             Fix For: 1.5.0
>
>
> concat(string|binary A, string|binary B...): string / binary
> Returns the string or bytes resulting from concatenating the strings or bytes passed
in as parameters in order. For example, concat('foo', 'bar') results in 'foobar'. Note that
this function can take any number of input strings.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message