spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Owen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-15383) Support appending new columns from other DataFrames
Date Wed, 18 May 2016 14:06:12 GMT

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

Sean Owen resolved SPARK-15383.
-------------------------------
    Resolution: Duplicate

That condition isn't sufficient. Really you're asking for "DataFrame.zip", in which case this
is a duplicate.

> Support appending new columns from other DataFrames
> ---------------------------------------------------
>
>                 Key: SPARK-15383
>                 URL: https://issues.apache.org/jira/browse/SPARK-15383
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 1.6.1
>            Reporter: Lijie Xu
>            Priority: Minor
>
> It is common to add column(s) from other DataFrame(s) as follows. However, current *withColumn()*
function only supports appending a new column from the same DataFrame.
> {code:java}
>     val df1 = sc.makeRDD(1 to 5).toDF("a")
>     val df2 = sc.makeRDD(10 to 15).toDF("b")
>     val df = df1.withColumn("b", df2("b")) // Exception
> {code}
> Exception in thread "main" org.apache.spark.sql.AnalysisException: resolved attribute(s)
b#3 missing from a#1 in operator !Project [a#1,b#3 AS b#4];



--
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