bvaradar commented on code in PR #8384:
URL: https://github.com/apache/hudi/pull/8384#discussion_r1169393529
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/TestAlterTableDropPartition.scala:
##########
@@ -320,9 +364,26 @@ class TestAlterTableDropPartition extends
HoodieSparkSqlTestBase {
| )
|""".stripMargin)
+ df.write.format("hudi")
+ .option(HoodieWriteConfig.TBL_NAME.key, tableName)
+ .option(TABLE_TYPE.key, COW_TABLE_TYPE_OPT_VAL)
+ .option(RECORDKEY_FIELD.key, "id")
+ .option(PRECOMBINE_FIELD.key, "ts")
+ .option(PARTITIONPATH_FIELD.key, "year,month,day")
+ .option(HIVE_STYLE_PARTITIONING.key, hiveStyle)
+ .option(KEYGENERATOR_CLASS_NAME.key,
classOf[ComplexKeyGenerator].getName)
+ .option(HoodieWriteConfig.INSERT_PARALLELISM_VALUE.key, "1")
+ .option(HoodieWriteConfig.UPSERT_PARALLELISM_VALUE.key, "1")
+ .mode(SaveMode.Append)
+ .save(tablePath)
+
// drop 2021-10-01 partition
spark.sql(s"alter table $tableName drop partition (year='2021',
month='10', day='01')")
+ // trigger clean so that partition deletion kicks in.
+ spark.sql(s"call run_clean(table => '$tableName', retain_commits =>
1)")
+ .collect()
+
Review Comment:
Should we expect the cleanup to delete non-zero files. If so, can we add
assertion ?
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -381,7 +376,7 @@ private static List<String>
getPartitionsAdded(HoodieCommitMetadata commitMetada
}
private static List<String> getPartitionsDeleted(HoodieCommitMetadata
commitMetadata) {
- if (commitMetadata instanceof HoodieReplaceCommitMetadata
+ /*if (commitMetadata instanceof HoodieReplaceCommitMetadata
Review Comment:
Yes, Lets remove the function completely as it is returning just an empty
list.
--
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]