abhishekagarwal87 commented on code in PR #14463:
URL: https://github.com/apache/druid/pull/14463#discussion_r1239371825
##########
extensions-core/stats/src/main/java/org/apache/druid/query/aggregation/variance/sql/BaseVarianceSqlAggregator.java:
##########
@@ -137,21 +149,77 @@ public Aggregation toDruidAggregation(
);
}
+ private static class VarPopSqlAggFunction extends SqlAggFunction
Review Comment:
can you add a note at the top that these various aggregate functions are
same as SqlAvgAggFunction except that these versions pass `OperandTypes.Any`
while standard function in calcite pass `OperandTypes.Numeric`
##########
extensions-core/stats/src/main/java/org/apache/druid/query/aggregation/variance/sql/BaseVarianceSqlAggregator.java:
##########
Review Comment:
I think a lot of boilerplate code here can be removed if you add a class
called `DruidSqlAvgAggFunction` and in that class, the constructor passes the
Any operand type. Then all the variance and std dev aggregation functions can
extend that class and simply pass the `kind` value
--
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]