Greg Lee created SPARK-28662: -------------------------------- Summary: Create Hive Partitioned Table without specifying data type for partition columns will success unexpectedly Key: SPARK-28662 URL: https://issues.apache.org/jira/browse/SPARK-28662 Project: Spark Issue Type: Bug Components: SQL Affects Versions: 3.0.0 Reporter: Greg Lee Fix For: 3.0.0
*Case :* Create Hive Partitioned Table without specifying data type for partition column will success unexpectly. {code:java} // 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 {code} *Root Cause:* In https://issues.apache.org/jira/browse/SPARK-26435 , PARTITIONED BY clause are extended to support Hive CTAS as following: {code:java} // Before (PARTITIONED BY '(' partitionColumns=colTypeList ')’ //After (PARTITIONED BY '(' partitionColumns=colTypeList ‘)’| PARTITIONED BY partitionColumnNames=identifierList) | {code} 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 -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org