Skip to content

fix: make skip_partial_aggregation_probe_ratio_threshold match the docs#22752

Open
haohuaijin wants to merge 3 commits into
apache:mainfrom
haohuaijin:chore-skip-agg
Open

fix: make skip_partial_aggregation_probe_ratio_threshold match the docs#22752
haohuaijin wants to merge 3 commits into
apache:mainfrom
haohuaijin:chore-skip-agg

Conversation

@haohuaijin
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

The config skip_partial_aggregation_probe_ratio_threshold was documented as triggering skip when the ratio is greater than the threshold, but the code used >=. This meant setting the threshold to 1.0 (to disable the feature) still skipped rows when cardinality was exactly 100%.

What changes are included in this PR?

  • Changed >= to > in the ratio comparison to match the docs.
  • Return None for SkipAggregationProbe when probe_ratio_threshold >= 1.0, effectively disabling the feature since the ratio can never exceed 1.0.

Are these changes tested?

Yes. Added test_skip_aggregation_disabled_at_threshold_one which sets threshold to 1.0 with 100% cardinality input and asserts that no rows are skipped.

Are there any user-facing changes?

Yes. Setting skip_partial_aggregation_probe_ratio_threshold = 1.0 now reliably disables skip aggregation, matching the documented behavior.

@haohuaijin haohuaijin changed the title Chore skip agg fix: make skip_partial_aggregation_probe_ratio_threshold match the docs Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant