hidataplus commented on code in PR #13497:
URL: https://github.com/apache/iceberg/pull/13497#discussion_r2227878351


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:
##########
@@ -221,9 +230,20 @@ public boolean dropTable(TableIdentifier identifier, 
boolean purge) {
 
     TableOperations ops = newTableOps(identifier);
     TableMetadata lastMetadata = null;
-    if (purge) {
+
+    LOG.info("deleteTableRootDir: {}", this.deleteTableRootDir);
+    boolean externalTablePurge = false;
+    boolean gcEnabled = false;
+
+    if (purge || this.deleteTableRootDir) {

Review Comment:
   > Why do we delete the table root directory if the `purge` is `false`? Is 
this the expected behavior?
   
   purge is keyword. in spark3.5, you should use "drop table icebergTable 
purge" but in hive4, you just use "drop table icebergTable" , this will make 
user confusing. we hope make same sql to avoid problem.
   
   about `purge` , in spark3.5, if not iceberg table , if ` 
external.table.purge=true` ,it will drop table root path. so  it not  same as 
iceberg table too. the `purge ` will effect when  ` 
external.table.purge=false`. 
   
   ps. when create iceberg table in hive4 ,it will create a external table, and 
will add atribute "external.table.purge=true", and when drop this iceberg table 
,it will delete table root path. if  "external.table.purge=false", it will not 
delete table root path.



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