github-actions[bot] commented on code in PR #68426:
URL: https://github.com/apache/doris/pull/68426#discussion_r4079217551
##########
be/src/exprs/aggregate/aggregate_function_map_v2.cpp:
##########
@@ -56,6 +56,8 @@ AggregateFunctionPtr
create_aggregate_function_map_agg_v2(const std::string& nam
case PrimitiveType::TYPE_TIMESTAMP_NS:
case PrimitiveType::TYPE_TIMEV2:
case PrimitiveType::TYPE_TIMESTAMPTZ:
+ case PrimitiveType::TYPE_IPV4:
+ case PrimitiveType::TYPE_IPV6:
Review Comment:
[P1] Size the IP aggregate-state key blob to the bytes actually written.
Adding these cases also makes `map_agg_state`/`map_agg_union`/`map_agg_merge`
constructible for IP keys. Once a partial state has 17 zero-heavy IPv6 keys (or
65 IPv4 keys), `DataTypeNumberBase` switches to stream-vbyte:
`get_uncompressed_serialized_bytes` returns an upper bound, while `serialize`
returns a shorter actual length. `MapAggV2::write` computes that
`written_bytes` value but writes the key blob at the upper-bound size;
`AggregateStateUnion` then feeds the trailing bytes to `MapAggV2::read`, whose
exact-consumption `DCHECK` aborts ASAN/debug builds. Please resize the key
buffer to `written_bytes`, as the value branch already does, and cover a state
union/merge round trip above the threshold.
--
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]