hubgeter commented on code in PR #68463:
URL: https://github.com/apache/doris/pull/68463#discussion_r4092607821
##########
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:
Agreed. A default change always commits a new schema id, so the
schema-generation fences reject it before this comparison for every non-REWRITE
write; the old test bypassed them. Rewrote it to bind columns and identity in
one statement scope, evolve the default, and assert the write is rejected.
Scoped the description to the REWRITE fix; no behavior change for other writes.
--
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]