Description
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:
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
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.