xiedeyantu commented on code in PR #5040:
URL: https://github.com/apache/calcite/pull/5040#discussion_r3471498844
##########
core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java:
##########
@@ -2609,6 +2618,47 @@ private RexNode convertOver(Blackboard bb, SqlNode node)
{
}
}
+ /**
+ * Applies a FILTER clause to the arguments of an aggregate call by wrapping
+ * each argument in a CASE expression. For example,
+ * {@code SUM(sal) FILTER (WHERE comm IS NOT NULL)} becomes
+ * {@code SUM(CASE WHEN comm IS NOT NULL THEN sal END)}.
Review Comment:
Could you add a related test?
--
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]