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()` 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
So, this PR doesn't affect `ALTER TABLE .. ADD PARTITION` but it affects v2
`ALTER TABLE .. RENAME PARTITION` which propagates the exception directly to
users.
--
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]