MaxGekk opened a new pull request #30474:
URL: https://github.com/apache/spark/pull/30474


   ### What changes were proposed in this pull request?
   In the PR, I propose to changes the resolver of partition specs used in V2 
`ALTER TABLE .. ADD/DROP PARTITION` (at the moment), and re-use `CAST` in 
conversion partition values to desired types according to the partition schema.
   
   ### Why are the changes needed?
   Currently, the resolver of V2 partition specs supports just a few types: 
https://github.com/apache/spark/blob/23e9920b3910e4f05269853429c7f18888cdc7b5/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolvePartitionSpec.scala#L72,
 and fails on other types like date/timestamp.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes
   
   ### How was this patch tested?
   By running `AlterTablePartitionV2SQLSuite`
   


----------------------------------------------------------------
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:
[email protected]



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

Reply via email to