Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5215

CTTAS: disallow temp tables in view expansion logic

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.10.0
    • 1.10.0
    • None
    • None

    Description

      This Jira is addressing last two CR comments in PR for Jira DRILL-4956:
      1. Disallow temp tables in view expansion logic.
      Steps to reproduce:
      a. use default temporary workspace.
      b. create persistent table with name t:
      c. create view over persistent table.
      d. drop persistent table.
      e. create temporary table with the same name as persistent table.
      f. select from view
      Currently Drill returns result on step f but should return error message.

      VALIDATION ERROR: Temporary tables usage is disallowed. Used temporary table name: t
      
      use dfs.tmp;
      create table t as select 'TABLE' from (values(1));
      create view v as select * from t;
      select * from v;
      +---------+
      | EXPR$0  |
      +---------+
      | TABLE   |
      +---------+
      drop table t;
      create temporary table t as select 'TEMP' from (values(1));
      select * from v;
      +---------+
      | EXPR$0  |
      +---------+
      | TEMP    |
      +---------+
      

      2. Replace link to gist with CTTAS design doc to Jira link.

      Attachments

        Issue Links

          Activity

            People

              arina Arina Ielchiieva
              arina Arina Ielchiieva
              Jinfeng Ni Jinfeng Ni
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: