hubgeter commented on code in PR #65851:
URL: https://github.com/apache/doris/pull/65851#discussion_r3663573441
##########
fe/fe-core/src/main/java/org/apache/doris/planner/IcebergTableSink.java:
##########
@@ -121,21 +130,32 @@ public void bindDataSink(Optional<InsertCommandContext>
insertCtx)
tSink.setTbName(targetTable.getName());
boolean isRewriting = false;
+ Optional<IcebergWriteSchemaContext> executorWriteSchemaContext =
Optional.empty();
if (insertCtx.isPresent() && insertCtx.get() instanceof
IcebergInsertCommandContext) {
IcebergInsertCommandContext context =
(IcebergInsertCommandContext) insertCtx.get();
isRewriting = context.isRewriting();
+ executorWriteSchemaContext = context.getWriteSchemaContext();
if (isRewriting) {
tSink.setWriteType(TIcebergWriteType.REWRITE);
}
}
+ if (!executorWriteSchemaContext.equals(writeSchemaContext)) {
+ throw new AnalysisException("Iceberg write schema context differs
between plan and executor");
+ }
- Schema schema = icebergTable.schema();
+ Schema schema = writeSchemaContext
Review Comment:
Fixed in 09f9bfec3e1. Branch planning now binds the current spec and sort
order to the pinned branch schema and rejects incompatible source IDs before
dispatch. The pinned branch schema/spec/order/file/metrics bundle is used by BE
planning and commit reconstruction. VIcebergTableWriter now uses find and
throws INTERNAL_ERROR when a partition source is absent instead of inserting
map key zero and reading column 0. Added FE branch incompatibility coverage and
a focused BE failure test.
--
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]