refactor(query): improve aggregate bitmap and aggregate function state#19707
refactor(query): improve aggregate bitmap and aggregate function state#19707zhang2014 wants to merge 4 commits intodatabendlabs:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89f6a99245
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if let Some(existing) = state.rb.take() { | ||
| bitmaps.push(existing); | ||
| } | ||
| if let Some(validity) = validity { | ||
| if validity.null_count() == view.len() { |
There was a problem hiding this comment.
Preserve state when batch input has no valid bitmaps
The new batch path removes the current aggregate value with state.rb.take() before checking whether the entire chunk is null, and then exits early on validity.null_count() == view.len(). In multi-block aggregation, an all-null later block will therefore erase the bitmap accumulated from earlier blocks, yielding an incorrect final bitmap_or result. Make the all-null check happen before taking state.rb (or restore it before returning) so null-only chunks remain no-ops.
Useful? React with 👍 / 👎.
Docker Image for PR
|
Docker Image for PR
|
Docker Image for PR
|
🤖 CI Job Analysis
📊 Summary
❌ NO RETRY NEEDEDAll failures appear to be code/test issues requiring manual fixes. 🔍 Job Details
🤖 AboutAutomated analysis using job annotations to distinguish infrastructure issues (auto-retried) from code/test issues (manual fixes needed). |
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
refactor(query): improve aggregate bitmap and aggregate function state
Tests
Type of change
This change is