voonhous commented on code in PR #19875:
URL: https://github.com/apache/hudi/pull/19875#discussion_r3975770841


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieDropPartitionsTool.java:
##########
@@ -301,6 +301,11 @@ public void run() {
       log.info(cfg.toString());
 
       Mode mode = Mode.valueOf(cfg.runningMode.toUpperCase());
+      if (cfg.syncToHive) {

Review Comment:
   Not intended; moved into the `DELETE` arm, ahead of 
`doDeleteTablePartitions`, so a dry run prints the listing as before and only 
the destructive path validates the hive arguments first. Added a dry-run case 
with `--sync-hive-meta` and no database that asserts the listing and no new 
instant. Done in 3abc52e1ac66.



##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieDropPartitionsTool.java:
##########
@@ -357,12 +362,12 @@ private HiveSyncConfig buildHiveSyncProps() {
     props.put(DataSourceWriteOptions.HIVE_PASS().key(), cfg.hivePassWord);
     props.put(DataSourceWriteOptions.HIVE_URL().key(), cfg.hiveURL);
     props.put(DataSourceWriteOptions.HIVE_PARTITION_FIELDS().key(), 
cfg.hivePartitionsField);

Review Comment:
   Confirmed: the tool writes the empty string explicitly, which also defeats 
the inference from the table config, and `HiveSyncTool` returns early on empty 
partition fields. `verifyHiveConfigs` now requires `--hive-partition-field` as 
well; the new test asserts the delete fails naming the flag with nothing 
dropped. Done in 3abc52e1ac66.



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

Reply via email to