[ 
https://issues.apache.org/jira/browse/HIVE-26064?focusedWorklogId=748488&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748488
 ]

ASF GitHub Bot logged work on HIVE-26064:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Mar/22 08:51
            Start Date: 28/Mar/22 08:51
    Worklog Time Spent: 10m 
      Work Description: marton-bod commented on a change in pull request #3132:
URL: https://github.com/apache/hive/pull/3132#discussion_r836194268



##########
File path: 
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java
##########
@@ -1052,6 +1053,47 @@ public void testDropTableWithAppendedData() throws 
IOException {
     shell.executeStatement("DROP TABLE customers");
   }
 
+  @Test
+  public void testDropTableWithoutPurge() throws IOException {
+    TableIdentifier identifier = TableIdentifier.of("default", "customers");
+
+    shell.executeStatement("CREATE EXTERNAL TABLE customers (" +
+        "t_int INT,  " +
+        "t_string STRING) " +
+        "STORED BY ICEBERG " +
+        testTables.locationForCreateTableSQL(identifier) +
+        
testTables.propertiesForCreateTableSQL(ImmutableMap.of(InputFormatConfig.EXTERNAL_TABLE_PURGE,
 "FALSE")));

Review comment:
       How about running this test without adding the purge=false flag 
explicitly? Explicitly adding it with FALSE will circumvent the MetaHook 
behaviour for the default case where the purge flag is simply omitted




-- 
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: gitbox-unsubscr...@hive.apache.org

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 748488)
    Time Spent: 20m  (was: 10m)

> For Iceberg external table do not set external.table.purge=true by default
> --------------------------------------------------------------------------
>
>                 Key: HIVE-26064
>                 URL: https://issues.apache.org/jira/browse/HIVE-26064
>             Project: Hive
>          Issue Type: Task
>            Reporter: Peter Vary
>            Assignee: Peter Vary
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When creating an Iceberg table, in the MetaHook we currently set 
> external.table.purge=true for all tables, unless provided otherwise.
> This goes against the docs / user expectations: 
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=82706445#:~:text=When%20dropping%20an%20EXTERNAL%20table%2C%20data%20in%20the%20table%20is%20NOT%20deleted%20from%20the%20file%20system
> As well as this property: hive.external.table.purge.default, which is set to 
> false in the system.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to