github-actions[bot] commented on code in PR #68483:
URL: https://github.com/apache/doris/pull/68483#discussion_r4091293775
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/agg/TopNWeighted.java:
##########
@@ -90,7 +90,7 @@ public class TopNWeighted extends NullableAggregateFunction
// four arguments
FunctionSignature.ret(ArrayType.of(DoubleType.INSTANCE))
.args(DoubleType.INSTANCE, BigIntType.INSTANCE,
IntegerType.INSTANCE, IntegerType.INSTANCE),
- FunctionSignature.ret(VarcharType.SYSTEM_DEFAULT)
+ FunctionSignature.ret(ArrayType.of(DecimalV2Type.CATALOG_DEFAULT))
Review Comment:
This still does not make the advertised legacy DecimalV2 overload work end
to end. For an explicit/current `DECIMALV2(18,3)` column, FE selects this
signature, but `topn_weighted_creator` omits `TYPE_DECIMALV2`, so BE returns a
controlled `Agg Function ... is not implemented` query error. Adding that
dispatch alone is insufficient: `CATALOG_DEFAULT` fixes the nested result at
`(9,0)`, and the signature compute chain does not specialize DecimalV2 inside
`ArrayType`, so an `(18,3)` child is paired with `(9,0)` output formatting
metadata. The SQL test's unqualified `DECIMAL(18,3)` is DecimalV3 under the
default conversion setting, while the unit test stops at `getSignature()` with
`(9,0)`, so neither detects these failures. Please support (or remove) the BE
legacy type, make the array item follow the concrete input, and add an executed
non-default-scale DecimalV2 regression for both arities and `[1]`.
--
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]