codope commented on code in PR #10153:
URL: https://github.com/apache/hudi/pull/10153#discussion_r1420367409
##########
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:
`partitions` was indeed empty, i've added a check.
--
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]