github-actions[bot] commented on code in PR #68962:
URL: https://github.com/apache/doris/pull/68962#discussion_r4256493152
##########
be/src/format_v2/column_mapper.cpp:
##########
@@ -1512,6 +1587,9 @@ static bool mapping_can_use_file_column_directly(const
ColumnMapping& mapping) {
if (!mapping.table_type->equals(*mapping.file_type) &&
!same_timestamptz_with_different_scale) {
return false;
}
+ if (!mapping_file_slot_is_equivalent(mapping)) {
Review Comment:
[P2] Update the rename-only test for the new mapping contract. This
deliberately makes renamed STRUCT mappings non-trivial, but
RenameOnlyProjectedStructDoesNotRebuildFileProjection still expects
is_trivial=true at column_mapper_test.cpp:2774 and :2787. Its file names {a,b}
and table names {a,renamed_b} fail nested_struct_names_match, so both
assertions fail on this head. Update those expectations and add a renamed
whole-root predicate check while retaining the valid full-physical-projection
assertions.
##########
be/src/format_v2/column_mapper.cpp:
##########
@@ -1288,6 +1292,14 @@ static VExprSPtr
rewrite_struct_or_slot_expr_to_file_expr(
return expr;
}
const auto& rewrite_info = rewrite_it->second;
+ DORIS_CHECK(rewrite_info.root_mapping != nullptr);
+ if (!mapping_file_slot_is_equivalent(*rewrite_info.root_mapping)) {
Review Comment:
[P2] Preserve scalar cast filtering when checking nested equivalence. For an
old file with INT value and an evolved BIGINT table field,
nested_struct_names_match returns false solely because the primitive kinds
differ. This guard then rejects generic predicates such as ABS(value)>15 (and
slot/literal predicates whose BIGINT literal does not fit INT) before the
existing cast_file_expr_to_table_type fallback can run. The file reader
receives no conjunct, so it reads/materializes every output row before the
scanner filters it; existing ColumnMapperBuildsCastFilterForTypeMismatch also
gets zero conjuncts instead of one. Restrict the nested-shape guard to complex
values, or allow scalar leaves through the existing lossless-cast checks.
--
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]