dongjoon-hyun commented on PR #59783:
URL: https://github.com/apache/spark/pull/59783#issuecomment-6421188859

   Thank you for the review 
([pullrequestreview-5645998752](https://github.com/apache/spark/pull/59783#pullrequestreview-5645998752)).
 As you suggested, I moved the check to where Spark creates or alters the Hive 
serde table:
   - `HiveExternalCatalog.createTable`
   - the pre-drop path of `CreateHiveTableAsSelectCommand`
   - `HiveExternalCatalog.alterTableSchema`
   
   Now the check sees the actual data columns by name after the partition 
columns are moved last, and it also covers `CREATE TABLE LIKE`. It runs only 
when the table doesn't exist, so `CREATE TABLE IF NOT EXISTS` stays a no-op. 
SPARK-60493 (#59734) rejects the partition columns. For `INSERT OVERWRITE 
DIRECTORY ... STORED AS`, `HiveFileFormat.supportDataType` rejects 
`TIMESTAMP_NTZ` like `TIME` and the geospatial types.
   
   I added test cases for these shapes:
   - a partitioned table whose partition column is not last
   - `CREATE TABLE LIKE`
   - `CREATE TABLE IF NOT EXISTS`
   - `saveAsTable` with `mode("overwrite")`
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to