[
https://issues.apache.org/jira/browse/SPARK-32372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Apache Spark reassigned SPARK-32372:
------------------------------------
Assignee: Apache Spark
> "Resolved attribute(s) XXX missing" after dudup conflict references
> -------------------------------------------------------------------
>
> Key: SPARK-32372
> URL: https://issues.apache.org/jira/browse/SPARK-32372
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.2.2, 2.3.4, 2.4.6, 3.0.0
> Reporter: wuyi
> Assignee: Apache Spark
> Priority: Blocker
>
> {code:java}
> // case class Person(id: Int, name: String, age: Int)
> sql("SELECT name, avg(age) as avg_age FROM person GROUP BY
> name").createOrReplaceTempView("person_a")
> sql("SELECT p1.name, p2.avg_age FROM person p1 JOIN person_a p2 ON p1.name =
> p2.name").createOrReplaceTempView("person_b")
> sql("SELECT * FROM person_a UNION SELECT * FROM person_b")
> .createOrReplaceTempView("person_c")
> sql("SELECT p1.name, p2.avg_age FROM person_c p1 JOIN person_c p2 ON p1.name
> = p2.name").show
> {code}
> error:
> {code:java}
> [info] Failed to analyze query: org.apache.spark.sql.AnalysisException:
> Resolved attribute(s) avg_age#235 missing from name#233,avg_age#231 in
> operator !Project [name#233, avg_age#235]. Attribute(s) with the same name
> appear in the operation: avg_age. Please check if the right attribute(s) are
> used.;;
> ...{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]