[HUDI-3826] Make truncate partition use delete_partition operation (#5272)
Make truncate partition and drop partition behave as drop partition with purge, which delete all records via Hudi DELETE_PARTITION; partition removed from metastore
This commit is contained in:
@@ -539,7 +539,7 @@ case class HoodiePostAnalysisRule(sparkSession: SparkSession) extends Rule[Logic
|
||||
// Rewrite TruncateTableCommand to TruncateHoodieTableCommand
|
||||
case TruncateTableCommand(tableName, partitionSpec)
|
||||
if sparkAdapter.isHoodieTable(tableName, sparkSession) =>
|
||||
new TruncateHoodieTableCommand(tableName, partitionSpec)
|
||||
TruncateHoodieTableCommand(tableName, partitionSpec)
|
||||
case _ => plan
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user