fix(query): preserve scalar bloom hashes in replace into - #20141
Merged
dantengsky merged 1 commit intoJul 14, 2026
Conversation
dantengsky
force-pushed
the
codex/fix-replace-scalar-bloom
branch
16 times, most recently
from
July 14, 2026 02:03
811c4d2 to
2cbb0ea
Compare
dantengsky
force-pushed
the
codex/fix-replace-scalar-bloom
branch
from
July 14, 2026 02:22
2cbb0ea to
4450123
Compare
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
SkyFan2002
approved these changes
Jul 14, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 14, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 14, 2026
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.
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Distributed
REPLACE INTOcan panic when an external Parquet source projects a constant conflictkey:
The SELECT-list constant remains a Scalar in a locally processed source block, but remote exchange
materializes it as a Column. The previous Bloom hashing code silently skipped the Scalar, so deletion
information for the same target block contained three Bloom hash columns from a local block and four
from a remote block, triggering the assertion.
This PR materializes every selected Bloom key as a full Column before hashing. This prevents the
panic and keeps source Bloom hashes aligned with their target columns.
Changes
filter_map(Value::as_column)with full-column materialization before Bloom hashing.FROM 'fs:///...'Parquet source, a SELECT-listconstant, an explicit three-node assertion, stable source/target partition placement, and an
actual conflicting row replacement.
Verification
v1.2.925-nightly-1f0ac2a483reproduces theleft: 3,right: 4panic.is
23, and the conflicting row is replaced with the source value.cargo fmt --all -- --checkgit diff --checkTests
Type of change
This change is