github-actions[bot] commented on code in PR #66345:
URL: https://github.com/apache/doris/pull/66345#discussion_r3708867980
##########
be/src/format_v2/table_reader.h:
##########
@@ -1491,27 +1522,107 @@ class TableReader {
return column.get();
}
+ static bool _requires_parent_null_map_for_alignment(const ColumnPtr&
column,
+ const DataTypePtr&
table_type) {
+ DORIS_CHECK(column.get() != nullptr);
+ DORIS_CHECK(table_type != nullptr);
+ if (table_type->is_nullable()) {
+ const auto& nested_type =
+ assert_cast<const
DataTypeNullable&>(*table_type).get_nested_type();
+ if (const auto* nullable_column =
check_and_get_column<ColumnNullable>(*column)) {
Review Comment:
[P1] Account for nearer nullable masks before allocating the ancestor
projection. This probe strips a nullable element/value wrapper and reports any
required-child physical NULL, even when that NULL is already covered by the
wrapper and lies only in visible rows. For parent mask `[1, 0]`, offsets `[1,
N+1]`, one valid entry in hidden row 0, and the only required-child NULL at the
end of row 1 under an element-null bit, this still allocates/fills an N-entry
projected mask and then another N-entry union although the ancestor bit can
protect only entry 0. The nonempty-span gate therefore leaves the O(entries)
scratch issue for ARRAY/MAP. Please intersect required descendant NULLs with
effective nearer masks and the ancestor-hidden spans before projecting, and
cover this nonempty-hidden-span case.
--
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]