-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-33742][SQL][3.1] Throw PartitionsAlreadyExistException from HiveExternalCatalog.createPartitions() #30729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ernalCatalog.createPartitions() 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` in `HiveClientImpl` and replace it by `PartitionsAlreadyExistException`. 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. Yes By running existing test suites: ``` $ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *AlterTableAddPartitionSuite" ``` Closes apache#30711 from MaxGekk/hive-partition-exception. Authored-by: Max Gekk <max.gekk@gmail.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit fab2995) Signed-off-by: Max Gekk <max.gekk@gmail.com>
|
Test build #132647 has finished for PR 30729 at commit
|
|
Kubernetes integration test starting |
|
jenkins, retest this, please |
|
Kubernetes integration test status failure |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #132653 has finished for PR 30729 at commit
|
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM. Thanks, @MaxGekk .
Merged to branch-3.1.
…veExternalCatalog.createPartitions() ### 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` in `HiveClientImpl` 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 -Phive-thriftserver "hive/test:testOnly org.apache.spark.sql.hive.client.VersionsSuite" $ build/sbt -Phive -Phive-thriftserver "hive/test:testOnly org.apache.spark.sql.hive.execution.HiveDDLSuite" ``` Authored-by: Max Gekk <max.gekkgmail.com> Signed-off-by: Dongjoon Hyun <dongjoonapache.org> (cherry picked from commit fab2995) Signed-off-by: Max Gekk <max.gekkgmail.com> Closes #30729 from MaxGekk/hive-partition-exception-3.1. Authored-by: Max Gekk <max.gekk@gmail.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
What changes were proposed in this pull request?
Throw
PartitionsAlreadyExistExceptionfromcreatePartitions()in Hive external catalog when a partition exists. Currently,HiveExternalCatalog.createPartitions()throwsAlreadyExistsExceptionwrapped byAnalysisException.In the PR, I propose to catch
AlreadyExistsExceptioninHiveClientImpland replace it byPartitionsAlreadyExistException.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:
Authored-by: Max Gekk max.gekk@gmail.com
Signed-off-by: Dongjoon Hyun dongjoon@apache.org
(cherry picked from commit fab2995)
Signed-off-by: Max Gekk max.gekk@gmail.com