You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Allison Wang (Jira)" <ji...@apache.org> on 2021/02/02 20:43:00 UTC

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

Allison Wang created SPARK-34335:
------------------------------------

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


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