lidinghao opened a new pull request #25390: [SPARK-28662] [SQL] Create Hive Partitioned Table without specifying data type for partition columns will success URL: https://github.com/apache/spark/pull/25390 ## What changes were proposed in this pull request? 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` 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) 。 This PR will check this case in visitCreateHiveTable and throw a exception which contains explicit error message to user. ## How was this patch tested? Added tests.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org