naveenp2708 commented on code in PR #57644:
URL: https://github.com/apache/spark/pull/57644#discussion_r3768066953
##########
sql/pipelines/src/main/scala/org/apache/spark/sql/pipelines/graph/GraphValidations.scala:
##########
@@ -270,8 +270,12 @@ trait GraphValidations extends Logging {
t.specifiedSchema.foreach { ss =>
// Check the inferred schema matches the specified schema. Used to
catch errors where the
- // inferred user-facing schema has columns that are not in the
specified one.
- if (inferredSchema != ss) {
+ // inferred user-facing schema has columns that are not in the
specified one. The reserved
+ // AUTO CDC metadata column(s) are engine-owned, so a declared schema
that differs from the
+ // inferred schema only by omitting them is accepted; the engine
appends them to the
+ // effective table schema at materialization.
+ if (inferredSchema != ss &&
Review Comment:
Done. Comparing both schemas with the reserved fields removed now, so
declaring one of several reserved fields won't wrongly fail.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]