github-actions[bot] commented on code in PR #69304:
URL: https://github.com/apache/doris/pull/69304#discussion_r4667187859
##########
be/src/exprs/aggregate/aggregate_function_null_v2.h:
##########
@@ -115,21 +183,36 @@ class AggregateFunctionNullBaseInlineV2 : public
IAggregateFunctionHelper<Derive
} else {
prefix_size = nested_function->align_of_data();
}
+ } else if constexpr (needs_empty_input_state_marker) {
+ // BITMAP_INTERSECT returns a non-NULL empty bitmap for no input,
but its
+ // empty partial must still be distinguishable from an actual
empty bitmap.
+ prefix_size = nested_function->align_of_data();
} else {
prefix_size = 0;
}
+ // The serialized type is queried by non-pipeline callers too
(AGG_STATE and UT).
+ // Initialize this wrapper from its creator's negotiated version
immediately.
+ AggregateFunctionNullBaseInlineV2::set_version(be_exec_version);
+ }
+
+ bool needs_nullable_serialized_column() const {
+ // Ordinary non-nullable results use the nested empty state for NULL
input.
Review Comment:
[P1] Preserve NULL-vs-empty semantics for version-19 native bitmap_intersect
When a version-19 BE receives a request with
`enable_aggregate_function_null_v2=true`, this condition leaves a
nonnullable-result `bitmap_intersect` on the V2 native path. The unique-key MOW
skip-bitmap path constructs this function with nullable input and a nonnullable
result; its bare `ColumnBitmap` output has no NULL map, so a NULL input is
serialized as an empty bitmap. The downstream bitmap merge treats that as a
real contribution, making `{1} INTERSECT NULL` empty. The marker/null-map is
enabled only from version 20. Keep this version-19 path on the legacy
String/nullable codec or add an equivalent native marker, and add a v19
regression for `{1} INTERSECT NULL`.
--
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]