[
https://issues.apache.org/jira/browse/DRILL-3373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jinfeng Ni updated DRILL-3373:
------------------------------
Description:
Sql parser should raise parsing error, when the CTAS statement has "PARTITION
BY", yet the list of partitioning column is empty.
{code}
create table nation_par
partition by
as
select n_nationkey, n_name, n_comment
from cp.`tpch/nation.parquet`;
{code}
The expected behavior would be SQL parer error :
{code}
Error: PARSE ERROR: Encountered "as" at line 3, column 1.
Was expecting:
"(" ...
{code}
was:
Sql parser should raising parsing error, when the CTAS statement has "PARTITION
BY", yet the list of partitioning column is empty.
{code}
create table nation_par
partition by
as
select n_nationkey, n_name, n_comment
from cp.`tpch/nation.parquet`;
{code}
The expected behavior would be SQL parer error :
{code}
Error: PARSE ERROR: Encountered "as" at line 3, column 1.
Was expecting:
"(" ...
{code}
> CTAS partition by with empty list of partitioning columns should be blocked
> in parser
> -------------------------------------------------------------------------------------
>
> Key: DRILL-3373
> URL: https://issues.apache.org/jira/browse/DRILL-3373
> Project: Apache Drill
> Issue Type: Bug
> Components: SQL Parser
> Reporter: Jinfeng Ni
> Assignee: Venki Korukanti
> Fix For: 1.1.0
>
> Attachments:
> 0001-DRILL-3373-Raise-parsing-error-when-CTAS-has-partiti.patch
>
>
> Sql parser should raise parsing error, when the CTAS statement has "PARTITION
> BY", yet the list of partitioning column is empty.
> {code}
> create table nation_par
> partition by
> as
> select n_nationkey, n_name, n_comment
> from cp.`tpch/nation.parquet`;
> {code}
> The expected behavior would be SQL parer error :
> {code}
> Error: PARSE ERROR: Encountered "as" at line 3, column 1.
> Was expecting:
> "(" ...
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)