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


##########
be/src/format_v2/column_mapper.cpp:
##########
@@ -1762,6 +1838,12 @@ Status 
TableColumnMapper::_create_mapping_for_column(const ColumnDefinition& tab
         // Doris internal Iceberg row locator is never a physical Iceberg data 
column. It is built
         // from file path, row position and partition metadata for 
delete/update/merge.
         mapping->virtual_column_type = TableVirtualColumnType::ICEBERG_ROWID;
+    } else if (table_column.initial_default_value.has_value()) {

Review Comment:
   [P1] Gate decoded initial defaults for mixed-version BEs
   
   Thrift fields 7/8 and the FE's Base64 map already existed and were populated 
recursively before this PR. For an old-FE plan whose file lacks a 
UUID/BINARY/FIXED field, old BEs return the carrier/generic default at a 
projected root and NULL/type-default for a missing child; this branch plus the 
new V1 hook and recursive V1/V2 child materializers decode the logical bytes. 
During a BE-first rollout, fragments of one scan can therefore return different 
values. Field 9 does not gate this behavior. Please put all of these paths 
behind the same compatible-FE scan capability as the projection-mode change, 
retaining legacy behavior when it is absent, with mixed-BE coverage for root 
and nested fields in both readers.



##########
be/src/format_v2/table/iceberg_reader.h:
##########
@@ -57,12 +58,18 @@ class IcebergTableReader : public format::TableReader {
     Status prepare_split(const format::SplitReadOptions& options) override;
     std::string debug_string() const override;
     format::TableColumnMappingMode mapping_mode() const override {
-        return !_data_reader.file_schema.empty() && 
_has_field_id(_data_reader.file_schema)
-                       ? format::TableColumnMappingMode::BY_FIELD_ID
-                       : format::TableColumnMappingMode::BY_NAME;
+        if (!_data_reader.file_schema.empty() &&
+            schema_has_any_field_id(_data_reader.file_schema)) {

Review Comment:
   [P1] Version the new any-ID projection rule for rolling upgrades
   
   This path is also reached by old-FE plans: `TField` IDs already existed, and 
no name-mapping property or field-9 marker is needed. During a BE-first 
rollout, for table `a#1, b#2` over file `a#1=10, b(no id)=20`, old BEs choose 
name mode and return `b=20`, while upgraded BEs choose field-ID mode and 
synthesize `b` as missing. A single distributed scan can therefore combine 
different results. The new authority bit gates only name-mapping fallback and 
is absent here. Please add a scan-semantics capability emitted only by 
compatible FEs, retaining the legacy all-ID selection when it is absent, and 
apply it consistently to V1/V2 and position-delete paths.



-- 
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