This is an automated email from the ASF dual-hosted git repository.
leesf pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 21a8a3c3693 [HUDI-6925] Do not list all partitions for 'alter table
drop partition' (#9837)
21a8a3c3693 is described below
commit 21a8a3c3693d550005b098f833630c6af8106aa7
Author: StreamingFlames <[email protected]>
AuthorDate: Wed Oct 11 03:17:21 2023 -0500
[HUDI-6925] Do not list all partitions for 'alter table drop partition'
(#9837)
---
.../scala/org/apache/spark/sql/hudi/HoodieSqlCommonUtils.scala | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git
a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/HoodieSqlCommonUtils.scala
b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/HoodieSqlCommonUtils.scala
index d5f46936be5..9751624e3bf 100644
---
a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/HoodieSqlCommonUtils.scala
+++
b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/HoodieSqlCommonUtils.scala
@@ -326,15 +326,7 @@ object HoodieSqlCommonUtils extends SparkAdapterSupport {
def getPartitionPathToDrop(
hoodieCatalogTable: HoodieCatalogTable,
normalizedSpecs: Seq[Map[String, String]]):
String = {
- val table = hoodieCatalogTable.table
- val allPartitionPaths = hoodieCatalogTable.getPartitionPaths
- val enableHiveStylePartitioning =
isHiveStyledPartitioning(allPartitionPaths, table)
- val enableEncodeUrl = isUrlEncodeEnabled(allPartitionPaths, table)
- val partitionFields = hoodieCatalogTable.partitionFields
- val partitionsToDrop = normalizedSpecs.map(
- makePartitionPath(partitionFields, _, enableEncodeUrl,
enableHiveStylePartitioning)
- ).mkString(",")
- partitionsToDrop
+ normalizedSpecs.map(makePartitionPath(hoodieCatalogTable, _)).mkString(",")
}
private def makePartitionPath(partitionFields: Seq[String],