andygrove commented on code in PR #27351:
URL: https://github.com/apache/datafusion/pull/27351#discussion_r4632456002
##########
datafusion/physical-plan/src/aggregates/skip_partial.rs:
##########
@@ -30,7 +30,9 @@ pub(super) struct SkipAggregationProbe {
// ========================================================================
/// Number of processed input rows (updated during probing)
input_rows: usize,
- /// Number of total group values for `input_rows` (updated during probing)
+ /// Number of groups created for `input_rows` (updated during probing).
+ /// A key that returns after an early emit is counted again, so this is the
+ /// number of rows the stream outputs for `input_rows`.
Review Comment:
The config doc for `skip_partial_aggregation_probe_ratio_threshold` still
defines the ratio as "number of distinct groups / number of input rows"
(`datafusion/common/src/config.rs`, line 1135). Under memory pressure that's no
longer what the probe compares. For example, 20M rows over 20K keys with 8
partitions and `-m 8M --mem-pool-type fair` now skips, even though there are
only 20K distinct keys. Could you update that doc to match this field, maybe
something like "number of groups the partial aggregation creates / number of
input rows, where a key that returns after an early emit counts again"?
`configs.md` would then need `./dev/update_config_docs.sh`.
##########
datafusion/physical-plan/src/aggregates/hash_stream.rs:
##########
Review Comment:
Could you file the re-probing follow-up and link it here? It could also
cover a stream that starts skipping during a burst of memory pressure, since
the decision is final once it's made.
--
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]