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 2020/11/06 04:42:01 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #30267: [SPARK-33364][SQL] Introduce the "purge" option in TableCatalog.dropTable for v2 catalog.

cloud-fan commented on a change in pull request #30267:
URL: https://github.com/apache/spark/pull/30267#discussion_r518519970



##########
File path: sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/TableCatalog.java
##########
@@ -162,6 +162,29 @@ Table alterTable(
    */
   boolean dropTable(Identifier ident);
 
+  /**
+   * Drop a table in the catalog with an option to purge.
+   * <p>
+   * If the catalog supports views and contains a view for the identifier and not a table, this
+   * must not drop the view and must return false.
+   * <p>
+   * If the purge option is set to false, the default implementation falls back to
+   * {@link #dropTable(Identifier)} dropTable}. Otherwise, it throws
+   * {@link UnsupportedOperationException}.

Review comment:
       we should mention that, people need to overwrite this method to support the purge option.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org