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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.1.0
    • SQL Parser
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: