Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26445 +/- ##
=======================================
Coverage 82.93% 82.93%
=======================================
Files 1154 1154
Lines 457851 457915 +64
Branches 457851 457915 +64
=======================================
+ Hits 379701 379761 +60
Misses 55131 55131
- Partials 23019 23023 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bvolpato
marked this pull request as ready for review
October 17, 2026 14:55
bvolpato
force-pushed
the
bvolpato/fix-topk-nan-grouping
branch
from
October 20, 2026 02:49
98d4394 to
fdd9fd1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #26444.
Rationale for this change
Repeated identical NaN keys can form separate TopK groups, and evicting a NaN group can panic. Valid
GROUP BY ... ORDER BY ... LIMITqueries can therefore return incorrect results or fail.What changes are included in this PR?
A separate prerequisite commit retains the RSS sampling fix from #26208. It samples the current process before query execution so short queries cannot leave the recorded maximum at zero. Memory thresholds are unchanged.
What is the testing strategy for this PR?
The SQL regressions cover repeated NaN keys and eviction. Applied to current main (
7f493a565), the eviction regression fails withinternal error: entered unreachable code; it passes with this fix. Hash-table tests cover Float16/32/64, distinct NaN payloads, signed zero, and NULL aggregate transitions.The extended workspace suite, full SQL logic suite, and
cargo test --profile ci -p datafusion-clipassed.cargo fmt --all,cargo clippy --all-targets --all-features -- -D warnings, anduv run ./dev/rust_lint.shalso passed.The existing
topk_aggregateprimitive-key case showed no significant change against main. This comparison used the unoptimized CI profile on a shared host, so its performance evidence is limited.Are there any user-facing changes?
Identical NaN keys form one TopK group, and evicting a NaN group succeeds. Signed-zero grouping matches ordinary aggregation. There are no public API changes.
AI-assisted contribution.