Lijie Xu created SPARK-15903:
--------------------------------

             Summary: Support AllColumn expression in UDF functions
                 Key: SPARK-15903
                 URL: https://issues.apache.org/jira/browse/SPARK-15903
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 1.6.1
            Reporter: Lijie Xu
            Priority: Minor


Sometimes, we want to put all the columns in the UDF functions such as 
"concat()". We would like to use simple $"*" instead of listing each column as 
follow.

val df = sc.makeRDD(Array((1, "A"), (2, "B"), (3, "C"))).toDF("Id", "Name")
val result = df.select($"*", concat($"*").as("UDF")) // failed
val result = df.select($"*", concat($"Id", $"Name").as("UDF")) // passed
result.show()



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

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

Reply via email to