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

CTAS partition by with empty list of partitioning columns should be blocked in parser

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.0
    • Component/s: SQL Parser
    • Labels:
      None

      Description

      Sql parser should raise parsing error, when the CTAS statement has "PARTITION BY", yet the list of partitioning column is empty.

      create table nation_par 
      partition by
      as 
      select n_nationkey, n_name, n_comment 
      from cp.`tpch/nation.parquet`;
      

      The expected behavior would be SQL parer error :

      Error: PARSE ERROR: Encountered "as" at line 3, column 1.
      Was expecting:
          "(" ...
      

        Attachments

          Activity

            People

            • Assignee:
              jni Jinfeng Ni
              Reporter:
              jni Jinfeng Ni
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: