LuciferYang commented on code in PR #11246:
URL: https://github.com/apache/paimon/pull/11246#discussion_r4624810065
##########
paimon-spark/paimon-spark4-common/src/main/scala/org/apache/spark/sql/paimon/shims/Spark4Shim.scala:
##########
@@ -186,7 +186,7 @@ class Spark4Shim extends SparkShim {
val statementType = "REPLACE TABLE"
val columns = schemaOrColumns.asInstanceOf[Seq[ColumnDefinition]]
ResolveDefaultColumns.validateCatalogForDefaultValue(columns, catalog,
ident)
- GeneratedColumn.validateGeneratedColumns(tableSchema, catalog, ident,
statementType)
+ validateGeneratedColumns(tableSchema, columns, catalog, ident,
statementType)
Review Comment:
Confirmed. This is not specific to 4.3: on master, Spark 4.1 and 4.2 plan a
column-list REPLACE TABLE through the same `PaimonReplaceTableStrategy` and
ignore the constraint the same way. I opened #11267 to fix it there, with your
repro as a test on 4.1 and 4.2. Once it is merged I'll rebase this PR and add
the same case to `Spark43CompatibilityTest`.
--
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]