HeartSaVioR 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_r352921638
##########
File path:
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/SupportsVacuum.java
##########
@@ -0,0 +1,17 @@
+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:
Throwing IllegalArgumentException sounds really weird if there's no
argument. IMHO that should be some exception (even a new class) clearly
representing the intention.
----------------------------------------------------------------
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]