Description
Case :
Create Hive Partitioned Table without specifying data type for partition column will success unexpectly.
// create a hive table partition by b, but the data type of b isn't specified. CREATE TABLE tbl(a int) PARTITIONED BY (b) STORED AS parquet
Root Cause:
In https://issues.apache.org/jira/browse/SPARK-26435 , PARTITIONED BY clause are extended to support Hive CTAS as following:
// Before (PARTITIONED BY '(' partitionColumns=colTypeList ')’ //After (PARTITIONED BY '(' partitionColumns=colTypeList ‘)’| PARTITIONED BY partitionColumnNames=identifierList) |
Create Table Statement like above case will pass the syntax check, and recognized as (PARTITIONED BY partitionColumnNames=identifierList) 。
We should check this case in visitCreateHiveTable and give a explicit error message to user
Attachments
Issue Links
- links to