Davis-Zhang-Onehouse commented on code in PR #12587:
URL: https://github.com/apache/hudi/pull/12587#discussion_r1908068912
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/UpdateHoodieTableCommand.scala:
##########
@@ -45,6 +81,24 @@ case class UpdateHoodieTableCommand(ut: UpdateTable) extends
HoodieLeafRunnableC
case Assignment(attr: AttributeReference, value) => attr -> value
}
+ // We don't support update queries changing partition column value.
+ validateNoAssignmentsToTargetTableAttr(
+ sparkSession.sessionState.conf.resolver,
+ hoodieCatalogTable.tableConfig.getPartitionFields.orElse(Array.empty),
+ tableId,
+ "partition field",
+ assignedAttributes
+ )
+
+ // We don't support update queries changing the primary key column value.
+ validateNoAssignmentsToTargetTableAttr(
+ sparkSession.sessionState.conf.resolver,
+ hoodieCatalogTable.tableConfig.getRecordKeyFields.orElse(Array.empty),
+ tableId,
+ "primaryKey field",
Review Comment:
done
--
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]