fix: guard empty fixed-width vectors in CBloomFilter to avoid index-out-of-range panic#25864
fix: guard empty fixed-width vectors in CBloomFilter to avoid index-out-of-range panic#25864SAY-5 wants to merge 1 commit into
Conversation
…ut-of-range panic Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
|
gouhongshen
left a comment
There was a problem hiding this comment.
Codex automated review
No concrete regressions found. The guards correctly make empty fixed-width vectors no-ops, matching the existing varlena behavior and issue contract. Local focused tests could not run because Go is unavailable; PR CI reported success.
What type of PR is this?
Which issue(s) this PR fixes:
issue #25618
What this PR does / why we need it:
The three fixed-width
CBloomFiltermethods (testAndAddFixedVector,testFixedVector,addFixedVector) take&fixedData[0]and&results[0]unconditionally, which panics withindex out of range [0] with length 0when the input vector is empty. Their varlena counterparts (testAndAddVarlenaVector,testVarlenaVector,addVarlenaVector) already return early onv.Length() == 0, so behavior on empty input was inconsistent by type.This adds the same zero-length early return to the fixed-width path so
TestVector/AddVector/TestAndAddVectorare no-ops on an empty vector instead of panicking, matching the varlena behavior. A regression test covers all three fixed-width APIs.