You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2021/04/18 03:21:00 UTC

[jira] [Commented] (SPARK-35038) org.apache.spark.sql.AnalysisException: Resolved attribute(s) colName#390 missing from listofcolumns

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

Hyukjin Kwon commented on SPARK-35038:
--------------------------------------

[~unical1988] can you show self-contained reproducer?

> org.apache.spark.sql.AnalysisException: Resolved attribute(s) colName#390 missing from listofcolumns
> ----------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-35038
>                 URL: https://issues.apache.org/jira/browse/SPARK-35038
>             Project: Spark
>          Issue Type: Bug
>          Components: Build, SQL
>    Affects Versions: 3.1.1
>            Reporter: unical1988
>            Priority: Major
>
> I create a column to exchange an existing one in my dataframe using
> {code:java}
> withColumn {code}
> like so : 
> {noformat}
> Dataset<Row> df2 = spark.createDataset(data, Encoders.DOUBLE()).toDF("colName1");
> datasetRow.withColumn("colName1",df2.col("colName1"));{noformat}
> But the last line of code is yielding the following : 
> org.apache.spark.sql.AnalysisException: Resolved attribute(s) colName1#390 missing from ...
> Why ?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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