2010YOUY01 commented on code in PR #24444:
URL: https://github.com/apache/datafusion/pull/24444#discussion_r3817833696
##########
datafusion/physical-plan/src/aggregates/aggregate_hash_table/common.rs:
##########
@@ -546,23 +544,14 @@ impl HashAggregateAccumulator {
/// Evaluate aggregate arguments and filter for one input batch.
///
- /// For example, `AVG(x + 1) FILTER (WHERE x > 0)` evaluates both `x + 1`
- /// and `x > 0`.
+ /// For example, `AVG(x + 1) FILTER (WHERE x > 0)` evaluates `x > 0`
+ /// first, then evaluates `x + 1` only for selected rows.
Review Comment:
```suggestion
/// For example, `AVG(2 / x) FILTER (WHERE x > 0)` evaluates `x > 0`
/// first, then evaluates `2 / x` only for selected rows.
/// Filtered rows will be evaluated to `NULL`, and won't trigger
errors
/// such as divide by zero.
```
--
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]