spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terry Kim (Jira)" <j...@apache.org>
Subject [jira] [Created] (SPARK-30282) UnresolvedV2Relation should be resolved to temp view first
Date Tue, 17 Dec 2019 06:40:00 GMT
Terry Kim created SPARK-30282:
---------------------------------

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


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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message