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

Wenchen Fan reassigned SPARK-50744:
-----------------------------------

    Assignee: Vladimir Golubev

> Add a CTE-related test case involving view name resolution precedence
> ---------------------------------------------------------------------
>
>                 Key: SPARK-50744
>                 URL: https://issues.apache.org/jira/browse/SPARK-50744
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.0.0
>            Reporter: Vladimir Golubev
>            Assignee: Vladimir Golubev
>            Priority: Major
>              Labels: pull-request-available
>
> ```
> CREATE VIEW v1 AS SELECT 1;
> CREATE VIEW v2 AS SELECT * FROM v1;
> -- The result is 1.
> -- The `v2` body will be inlined in the main query tree during the analysis, 
> but upper `v1`
> -- CTE definition _won't_ take precedence over the lower `v1` view.
> WITH v1 AS (
>   SELECT 2
> )
> SELECT * FROM v2;
> ```



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to