Leoyzen commented on code in PR #7940:
URL: https://github.com/apache/hudi/pull/7940#discussion_r1106127884
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/catalog/HoodieHiveCatalog.java:
##########
@@ -656,12 +657,10 @@ public void dropTable(ObjectPath tablePath, boolean
ignoreIfNotExists)
client.dropTable(
tablePath.getDatabaseName(),
tablePath.getObjectName(),
- // Indicate whether associated data should be deleted.
- // Set to 'true' for now because Flink tables shouldn't have data in
Hive. Can
- // be changed later if necessary
- true,
+ // External table drops only the metadata, should not delete the
underlying data.
+
!TableType.EXTERNAL_TABLE.name().equals(getHiveTable(tablePath).getTableType().toUpperCase(Locale.ROOT)),
Review Comment:
This line should be reverted.
This should be set true because there is determine condition in
HiveMetaStore impl whether deleting data by "deleteData" AND "is not external
table" .
So set "deleteData" to true is expected.
```JAVA
boolean shouldDeleteData = deleteData && !isExternal;
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]