github-actions[bot] commented on code in PR #68463:
URL: https://github.com/apache/doris/pull/68463#discussion_r4089218158
##########
fe/fe-connector/fe-connector-iceberg/src/test/java/org/apache/doris/connector/iceberg/IcebergWritePlanProviderTest.java:
##########
@@ -1206,12 +1206,11 @@ public void planWriteRejectsWriteDefaultEvolution() {
table.updateSchema().updateColumnDefault("id", Literal.of(7)).commit();
- DorisConnectorException ex =
Assertions.assertThrows(DorisConnectorException.class,
- () -> planSink(table, contextWithStorage(),
- new WriteHandle(new IcebergTableHandle("db1", "t2"))
- .boundTargetColumns(boundColumns)));
- Assertions.assertTrue(ex.getMessage().contains("schema changed"),
- "a statement must retry instead of writing a value
materialized from the stale default");
+ // A value materialized from the bind-time default is an ordinary
written value, matching Spark, which
+ // never re-validates write defaults after analysis.
+ Assertions.assertDoesNotThrow(() -> planSink(table,
contextWithStorage(),
Review Comment:
[P2] Exercise the production schema-generation fence
This test bypasses the path whose behavior it claims to validate. A real
bound Iceberg write carries `writeMetadataIdentity(table)` (including
`schemaId`) through the sink handle, and
`IcebergConnectorTransaction.beginWrite` rejects the post-bind schema commit
before reaching the comparison changed by this patch. Non-REWRITE writes also
retain a pre-evolution `IcebergWriteSchemaContext` with its own schema-ID
check. Here the handle has no bound identity and `planSink` creates the
statement scope only after changing the default, so `assertDoesNotThrow` cannot
hold for INSERT/OVERWRITE/UPDATE/MERGE in production. Please bind both columns
and identity in one statement scope before evolving the default. If concurrent
default evolution is intended, relax both upstream fences with coverage;
otherwise scope this change and test to the stable REWRITE fix.
--
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]