rdblue commented on a change in pull request #26740: [SPARK-30053][SQL] Add the 
ability for v2 datasource so specify a vacuum action on the table
URL: https://github.com/apache/spark/pull/26740#discussion_r355228146
 
 

 ##########
 File path: 
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/SupportsVacuum.java
 ##########
 @@ -0,0 +1,18 @@
+package org.apache.spark.sql.connector.catalog;
+
+import org.apache.spark.annotation.Experimental;
+/**
+ * A mix-in interface for {@link Table} vacuum support. Data sources can 
implement this
+ * interface to provide the ability to perform table maintenance on request of 
the user.
+ */
+@Experimental
+public interface SupportsVacuum {
+
+  /**
+   * Performs maintenance on the table.  This often includes removing unneeded 
data and
+   * deleting stale records.
+   *
+   * @throws IllegalArgumentException If the vacuum is rejected due to 
required effort.
 
 Review comment:
   Why allow a source to reject a vacuum operation?
   
   If vacuuming is supported, then the source should always do the operation 
when requested. I don't see a reason why the source would need to reject it.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to