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


##########
be/src/format_v2/column_mapper.cpp:
##########
@@ -2084,7 +2161,25 @@ const ColumnDefinition* 
TableColumnMapper::_find_file_field(
         });
         return field_it == file_schema.end() ? nullptr : &*field_it;
     }
-    return matcher_for_mode(_options.mode).find(table_column, file_schema);
+    const auto* matched = matcher_for_mode(_options.mode).find(table_column, 
file_schema);
+    if (matched != nullptr || _options.mode != 
TableColumnMappingMode::BY_FIELD_ID ||
+        !_options.allow_idless_complex_wrapper_projection || 
table_column.children.empty()) {
+        return matched;
+    }
+    const ColumnDefinition* wrapper = nullptr;
+    for (const auto& candidate : file_schema) {
+        if (candidate.has_identifier_field_id() || candidate.children.empty() 
||
+            !has_shared_descendant_field_id(table_column, candidate)) {

Review Comment:
   [P1] Keep full-schema IDs available for wrapper discovery
   
   `table_column` has already been pruned to the requested access path here. 
For table `s#10<a#1 initial-default=7,b#2>`, file `s(no id)<b#2>`, and 
projection `s.a`, file-wide ID mode is active, but this helper sees only `a#1`; 
it cannot use physical `b#2` to identify `s`. V2 therefore marks the root 
missing and returns NULL instead of materializing `a=7` under non-null `s`, 
while V1's full `TField` subtree retains the wrapper. Please keep a full-schema 
identity view for this lookup and add a V2 result test with nullable parent 
rows.
   



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