starocean999 commented on code in PR #66681:
URL: https://github.com/apache/doris/pull/66681#discussion_r3781664254
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughAggregation.java:
##########
@@ -69,7 +69,11 @@ public Rule build() {
// 2. if the conjunct contains unique function, it should not
be pushed down;
// e.g. 'select a, sum(a) from t group by a having a +
random() > 10'
// not equals 'select a, sum(a) from t where a + random() >
10 group by a'
- if (!conjunct.containsVolatileExpression()
+ // 3. a NoneMovableFunction (e.g. assert_true) must not be
pushed below the
+ // aggregation either: the aggregation changes which rows
are evaluated
+ // (grouped output vs input rows), so assert_true would run
on a different
+ // domain and its error behavior would change.
+ if (!conjunct.containsNoneMovableOrVolatile()
&& !conjunctSlots.isEmpty() &&
canPushDownSlots.containsAll(conjunctSlots)) {
Review Comment:
minor issue, no need change
--
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]