You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/10/10 05:59:42 UTC
[GitHub] [spark] MaxGekk commented on a diff in pull request #38161: [SPARK-40714][SQL] Remove `PartitionAlreadyExistsException`
MaxGekk commented on code in PR #38161:
URL: https://github.com/apache/spark/pull/38161#discussion_r990931814
##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/SupportsAtomicPartitionManagement.java:
##########
@@ -50,11 +49,11 @@ public interface SupportsAtomicPartitionManagement extends SupportsPartitionMana
default void createPartition(
InternalRow ident,
Map<String, String> properties)
- throws PartitionAlreadyExistsException, UnsupportedOperationException {
+ throws PartitionsAlreadyExistException, UnsupportedOperationException {
Review Comment:
In the current implementation, Spark invokes `createPartition()`/`createPartitions()` **only** from `AddPartitionExec` (ALTER TABLE .. ADD PARTITION) where all exceptions from the methods are propagated to users directly. **But it doesn't matter** in our case because `AddPartitionExec.run()` checks partitions exist BEFORE the invokes, see:
https://github.com/apache/spark/blob/5d74ace648422e7a9bff7774ac266372934023b9/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/AddPartitionExec.scala#L41-L47
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org