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/19 20:24:53 UTC

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

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


##########
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:
   We can't do that unfortunately: `MERGE INTO` semantic does allow you to merge arbitrary input that might be drastically different from your target table, controlling what goes where w/ matched/non-matched statements (`t.id = s._other_id`, etc)



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