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


   ### What changes were proposed in this pull request?
   Throw `PartitionsAlreadyExistException` from `createPartitions()` in Hive 
external catalog when a partition exists. Currently, 
`HiveExternalCatalog.createPartitions()` throws `AlreadyExistsException` 
wrapped by `AnalysisException`.
   
   In the PR, I propose to catch `AlreadyExistsException` and replace it by 
`PartitionsAlreadyExistException`.
   
   ### Why are the changes needed?
   The behaviour of Hive external catalog deviates from V1/V2 in-memory 
catalogs that throw `PartitionsAlreadyExistException`. To improve user 
experience with Spark SQL, it would be better to throw the same exception. 
   
   ### Does this PR introduce _any_ user-facing change?
   Yes
   
   ### How was this patch tested?
   By running existing test suites:
   ```
   $ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly 
*AlterTableAddPartitionSuite"
   ```


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