codope commented on code in PR #10153:
URL: https://github.com/apache/hudi/pull/10153#discussion_r1419864951


##########
hudi-spark-datasource/hudi-spark3.2plus-common/src/main/scala/org/apache/spark/sql/hudi/catalog/HoodieCatalog.scala:
##########
@@ -54,7 +59,8 @@ class HoodieCatalog extends DelegatingCatalogExtension
   override def stageCreate(ident: Identifier, schema: StructType, partitions: 
Array[Transform], properties: util.Map[String, String]): StagedTable = {
     if (sparkAdapter.isHoodieTable(properties)) {
       val locUriAndTableType = deduceTableLocationURIAndTableType(ident, 
properties)
-      HoodieStagedTable(ident, locUriAndTableType, this, schema, partitions,
+      val partitionTransforms = if (partitions.isEmpty) 
buildPartitionTransforms(spark, locUriAndTableType._1.getPath) else partitions

Review Comment:
   oh yeah good point. I think `partitions` is just one element. I will test 
and handle this case.



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