You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/02/02 21:08:01 UTC

[jira] [Commented] (SPARK-34335) Support referencing subquery with column aliases by table alias

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

Apache Spark commented on SPARK-34335:
--------------------------------------

User 'allisonwang-db' has created a pull request for this issue:
https://github.com/apache/spark/pull/31444

> Support referencing subquery with column aliases by table alias
> ---------------------------------------------------------------
>
>                 Key: SPARK-34335
>                 URL: https://issues.apache.org/jira/browse/SPARK-34335
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.1.2
>            Reporter: Allison Wang
>            Priority: Major
>
> Allow referencing subquery with column aliases by table alias. For example
> {code:sql}
> -- This is supported
> SELECT t.c1, t.c2 FROM (SELECT 1 AS c1, 1 AS c2) t
> -- AnalysisException: cannot resolve '`t.c1`' given input columns: [c1, c2];
> SELECT t.c1, t.c2 FROM (SELECT 1 AS a, 1 AS b) t(c1, c2)
> {code}



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