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

Wenchen Fan reassigned SPARK-30282:
-----------------------------------

    Assignee: Terry Kim

> UnresolvedV2Relation should be resolved to temp view first
> ----------------------------------------------------------
>
>                 Key: SPARK-30282
>                 URL: https://issues.apache.org/jira/browse/SPARK-30282
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Terry Kim
>            Assignee: Terry Kim
>            Priority: Major
>
> For the following v2 commands, _Analyzer.ResolveTables_ does not check 
> against the temp views before resolving _UnresolvedV2Relation_, thus it 
> always resolves _UnresolvedV2Relation_ to a table:
>  * ALTER TABLE
>  * DESCRIBE TABLE
>  * SHOW TBLPROPERTIES
> Thus, in the following example, 't' will be resolved to a table, not a temp 
> view:
> {code:java}
> sql("CREATE TEMPORARY VIEW t AS SELECT 2 AS i")
> sql("CREATE TABLE testcat.ns.t USING csv AS SELECT 1 AS i")
> sql("USE testcat.ns")
> sql("SHOW TBLPROPERTIES t") // 't' is resolved to a table
> {code}
> For V2 commands, if a table is resolved to a temp view, it should error out 
> with a message that v2 command cannot handle temp views.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to