terrytlu commented on issue #11820:
URL: https://github.com/apache/iceberg/issues/11820#issuecomment-2716347264

   I think there are some confusions in `purge` meaning:
   https://spark.apache.org/docs/3.5.3/sql-ref-syntax-ddl-drop-table.html
   in spark reference, purge means skipping hdfs trash while dropping table
   
   https://iceberg.apache.org/docs/latest/spark-ddl/#drop-table
   in iceberg reference, purge means to drop the table from the catalog and 
delete the table's contents
   
   
   In the iceberg org.apache.iceberg.spark.SparkCatalog#purgeTable, it will 
invoke loadTable first and cause NoSuchTableException, so the client will 
instead invoke 
org.apache.spark.sql.execution.datasources.v2.V2SessionCatalog#purgeTable, 
which will do the final deletion of data
   <img width="921" alt="Image" 
src="https://github.com/user-attachments/assets/1d36be91-b205-41d6-888f-7232f9280427";
 />
   
   
   maybe we should invoke loadTable in the head of dropTable method to validate 
if it is a iceberg table ? 🤔  
   when drop a non-Iceberg table, let 
org.apache.spark.sql.execution.datasources.v2.V2SessionCatalog#dropTable do the 
actual work


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to