cloud-fan commented on a change in pull request #30886:
URL: https://github.com/apache/spark/pull/30886#discussion_r547241620
##########
File path:
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/SupportsAtomicPartitionManagement.java
##########
@@ -82,4 +86,19 @@ void createPartitions(
* @return true if partitions were deleted, false if any partition not exists
*/
boolean dropPartitions(InternalRow[] idents);
+
+ /**
+ * Drop an array of partitions atomically from table, and completely remove
partitions data
+ * by skipping a trash even if it is supported.
+ * <p>
+ * If any partition doesn't exists,
+ * the operation of purgePartitions need to be safely rolled back.
+ *
+ * @param idents an array of partition identifiers
+ * @return true if partitions were deleted, false if any partition not exists
+ * @throws NoSuchPartitionException If any partition identifier to alter
doesn't exist
+ * @throws UnsupportedOperationException If partition purging is not
supported
+ */
+ boolean purgePartitions(InternalRow[] idents)
+ throws NoSuchPartitionException, UnsupportedOperationException;
Review comment:
for backward compatibility, let's give a default implementation that
fails.
----------------------------------------------------------------
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]