github-actions[bot] commented on code in PR #69032:
URL: https://github.com/apache/doris/pull/69032#discussion_r4552200725
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/agg/MapAggregateFunction.java:
##########
@@ -56,8 +56,23 @@ public FunctionSignature customSignature() {
.args(MapType.of(keyType, argumentValueType));
}
+ @Override
+ public void checkLegalityBeforeTypeCoercion() {
+ if (getMapType().getKeyType().isSpatialType()) {
Review Comment:
[P1] Reject nested spatial MAP keys before map combinator dispatch
`checkLegalityBeforeTypeCoercion()` tests only
`getMapType().getKeyType().isSpatialType()`, so keys such as `ARRAY<GEOMETRY>`,
`MAP<INT,GEOGRAPHY>`, or `STRUCT<shape:GEOGRAPHY>` pass for
`count_map`/`sum_map`/`avg_map`/`min_map`/`max_map`. The BE factory then
dispatches the key primitive in `aggregate_function_map_combinator.cpp` and
hits `DORIS_CHECK(dispatch_switch_all(...))` for these complex types, failing
the backend instead of returning an analysis error. Apply the recursive
spatial-leaf check to the MAP key while retaining supported spatial values, and
cover direct/state/combinator paths.
--
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]