github-actions[bot] commented on code in PR #66345:
URL: https://github.com/apache/doris/pull/66345#discussion_r3709343739


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java:
##########
@@ -726,13 +738,22 @@ public PlanFragment visitPhysicalConnectorTableSink(
         // an instanceof Iceberg. Ordinary connector INSERTs keep 
WriteOperation.INSERT (byte-identical).
         WriteOperation writeOperation = connectorTableSink.isRewrite()
                 ? WriteOperation.REWRITE : WriteOperation.INSERT;
+        // The write list can omit explicit/static-partition columns, but 
schema-drift validation must
+        // retain the complete generation captured by BindSink instead of 
comparing that subset.
         PluginDrivenTableSink providerSink = new 
PluginDrivenTableSink(targetTable,
-                writePlanProvider, connSession, providerTableHandle, 
connectorColumns, writeSortInfo,
-                writeOperation);
+                writePlanProvider, connSession, providerTableHandle, 
connectorColumns,
+                boundTargetColumns, writeSortInfo, writeOperation, false,
+                boundWriteMetadataIdentity);

Review Comment:
   [P1] Fence Hive's live sink schema against these bound columns. The child 
expressions and bound target here come from bind-time schema S0, but 
HiveWritePlanProvider reloads HMS and builds THiveTableSink.columns from S1 
without consulting getBoundTargetColumns() or an identity. If an unpartitioned 
[a INT, b INT] table is reordered to [b INT, a INT] between bind and sink 
planning, BE indexes the S0 expression vector with S1 ordinals and writes a's 
value under b and vice versa; the Hive commit has no schema fence, so it can 
succeed silently. This is distinct from the existing partition/sort-coordinate 
thread because no partitioning is involved and the stale consumer is sink 
serialization. Please validate S1 against the bound schema or build the sink in 
the exact bound coordinate, with a reorder-race 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]

Reply via email to