Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • SQL
    • None

    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.

      Attachments

        Activity

          People

            imback82 Terry Kim
            imback82 Terry Kim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: