xiangfu0 commented on code in PR #19991:
URL: https://github.com/apache/pinot/pull/19991#discussion_r4365287989
##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/AggregationFunctionType.java:
##########
@@ -63,7 +63,7 @@ public enum AggregationFunctionType {
SUMLONG("sumLong", ReturnTypes.AGG_SUM,
OperandTypes.or(OperandTypes.INTEGER, OperandTypes.ARRAY_OF_INTEGER)),
SUMPRECISION("sumPrecision", ReturnTypes.explicit(SqlTypeName.DECIMAL),
OperandTypes.ANY, SqlTypeName.OTHER),
AVG("avg", SqlTypeName.OTHER, SqlTypeName.DOUBLE),
- MODE("mode", SqlTypeName.OTHER, SqlTypeName.DOUBLE),
+ MODE("mode", null, null, ReturnTypes.explicit(SqlTypeName.OTHER), new
ModeFinalReturnTypeInference()),
Review Comment:
Minor, non-blocking: this makes single-stage `MODE(booleanCol)` /
`MODE(timestampCol)` return BOOLEAN/TIMESTAMP instead of the old DOUBLE. You
already documented it in the PR description, so no change needed — just worth
making sure it lands in the release notes since it changes result types for
existing queries.
--
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]