You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/09/26 18:06:06 UTC

[GitHub] [hudi] fengjian428 commented on a diff in pull request #6355: add auto col cast in MergeIntoHoodieTableCommand

fengjian428 commented on code in PR #6355:
URL: https://github.com/apache/hudi/pull/6355#discussion_r980353314


##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/MergeIntoHoodieTableCommand.scala:
##########
@@ -150,15 +151,35 @@ case class MergeIntoHoodieTableCommand(mergeInto: MergeIntoTable) extends Hoodie
     // Create the write parameters
     val parameters = buildMergeIntoConfig(hoodieCatalogTable)
 
+    val expectedQueryColumns = hoodieCatalogTable.tableSchemaWithoutMetaFields
+
+    val coercedQueryOutput = coerceQueryOutputColumns(StructType(expectedQueryColumns), sourceDF.logicalPlan, hoodieCatalogTable, conf)

Review Comment:
   understood Thanks @alexeykudinkin 
   essentially, I realized that this issue was caused by we must use ExpressionPayload in MergeInto, but for now, write.payload.class can be overwritten by the user, so I changed the logic forced to use ExpressionPayload in MergeInto. WDYT?



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org