Gabriel39 commented on code in PR #66302:
URL: https://github.com/apache/doris/pull/66302#discussion_r3689500687
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java:
##########
@@ -263,6 +263,15 @@ protected void doInitialize() throws UserException {
}
}
super.doInitialize();
+ // This gate must run during shared initialization: batch split
assignment bypasses
+ // doGetSplits(), but it must never assign a semantic Variant
projection to an old BE.
+
checkVariantBackendCompatibilityForCurrentScan(backendPolicy.getBackends());
+ }
+
+ void checkVariantBackendCompatibilityForCurrentScan(Iterable<Backend>
backends)
+ throws UserException {
+ boolean projectsVariant = !isTableLevelCountStarPushdown() &&
projectsVariant(desc);
Review Comment:
Fixed. COUNT(*) bypass is granted only after a nonnegative metadata count is
available; fallback scans still require current backends and FileScannerV2.
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSink.java:
##########
@@ -725,6 +725,7 @@ private Plan
bindIcebergTableSink(MatchingContext<UnboundIcebergTableSink<Plan>>
Pair<IcebergExternalDatabase, IcebergExternalTable> pair =
bind(ctx.cascadesContext, sink);
IcebergExternalDatabase database = pair.first;
IcebergExternalTable table = pair.second;
+ IcebergUtils.validateWriteSchema(table.getFullSchema());
Review Comment:
Fixed. Variant write validation is enforced at the shared Iceberg
data-writing merge sink boundary, covering UPDATE and data-producing MERGE
plans. Delete-only MERGE remains supported.
--
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]