github-actions[bot] commented on code in PR #63128:
URL: https://github.com/apache/doris/pull/63128#discussion_r3217203620
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/types/AggStateType.java:
##########
@@ -56,6 +56,8 @@ public class AggStateType extends DataType {
.put("hist", "histogram")
.put("map_agg", "map_agg_v2")
.put("window_funnel", "window_funnel_v2")
+ .put("collect_list", "collect_list_v2")
+ .put("collect_set", "collect_set_v2")
Review Comment:
This canonicalization now moves `collect_list`/`collect_set` aggregate
states to the V2 names, but it leaves their public aliases behind.
`BuiltinAggregateFunctions` registers `group_array` as `CollectListV2` and
`group_uniq_array` as `CollectSetV2`, so `group_array_state(x)` builds a nested
function whose state type is `collect_list_v2`. However an explicit or
persisted `AGG_STATE<group_array(...)>` still becomes an `AggStateType` with
functionName `group_array`, because this map does not canonicalize that alias.
Later compatibility checks such as `CheckCast.checkWithLooseAggState()` compare
function names, so inserting/unioning the alias-produced state into an
alias-typed state column can fail even though both refer to the same aggregate.
Please canonicalize `group_array -> collect_list_v2` and `group_uniq_array ->
collect_set_v2` (and add coverage for alias state/merge or insert
compatibility).
--
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]