spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-28252) local/global temp view should not accept duplicate column names
Date Thu, 04 Jul 2019 14:47:00 GMT

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

Apache Spark reassigned SPARK-28252:
------------------------------------

    Assignee: Apache Spark

> local/global temp view should not accept duplicate column names
> ---------------------------------------------------------------
>
>                 Key: SPARK-28252
>                 URL: https://issues.apache.org/jira/browse/SPARK-28252
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Yuming Wang
>            Assignee: Apache Spark
>            Priority: Major
>
> {noformat}
> scala> spark.sql("create temp view v1 as select 1 as col1, 2 as col1")
> res0: org.apache.spark.sql.DataFrame = []
> scala> spark.sql("select col1 from v1").show
> 19/07/04 22:27:19 WARN ObjectStore: Failed to get database global_temp, returning NoSuchObjectException
> org.apache.spark.sql.AnalysisException: Reference 'col1' is ambiguous, could be: v1.col1,
v1.col1.; line 1 pos 7
>   at org.apache.spark.sql.catalyst.expressions.package$AttributeSeq.resolve(package.scala:259)
>   at org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.resolveChildren(LogicalPlan.scala:101)
>   at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveReferences$$anonfun$40.apply(Analyzer.scala:890)
>   at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveReferences$$anonfun$40.apply(Analyzer.scala:892)
>   at org.apache.spark.sql.catalyst.analysis.package$.withPosition(package.scala:53)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message