lincoln-lil commented on code in PR #4549:
URL: https://github.com/apache/calcite/pull/4549#discussion_r2368566532
##########
core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:
##########
@@ -2147,6 +2147,28 @@ private void
checkSemiOrAntiJoinProjectTranspose(JoinRelType type) {
.check();
}
+ /** Test case for all variance/standard deviation functions with FILTER
clause reduction. */
+ @Test void testVarianceStddevWithFilter() {
+ // Test to ensure FILTER conditions are properly propagated to decomposed
aggregates
+ // for all functions that use the reduceStddev method
+ final RelOptRule rule = AggregateReduceFunctionsRule.Config.DEFAULT
+ .withOperandFor(LogicalAggregate.class)
+ .withFunctionsToReduce(
+ EnumSet.of(SqlKind.STDDEV_POP, SqlKind.STDDEV_SAMP,
+ SqlKind.VAR_POP, SqlKind.VAR_SAMP, SqlKind.AVG))
+ .toRule();
+ final String sql = "select name, "
Review Comment:
Ok, I'll add a case : )
--
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]