Repository navigation
fix(frontend): support bool and bit literal pick keys - #26385
Conversation
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep-reviewed exact head 960ed9c. The literal path now materializes BOOL and width-bounded BIT values into the same physical vector types already supported by the typed-subquery path. I checked scalar/composite callers, sorting, hashmap insertion, ZoneMap construction, parse/range errors, and cleanup on failure; no ownership or lifecycle regression found. Focused tests pass under race x20, the full frontend package and go vet pass, git diff --check is clean, the head merges cleanly with current main, and the latest CI checks are green. No blocking issue found.
Merge Queue Status
This pull request spent 31 minutes 32 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonPull request #26385 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
Failing checks:
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Tick the box to put this pull request back in the merge queue (same as
|
…6385) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#26074 ## What this PR does / why we need it: `DATA BRANCH PICK ... KEYS(...)` materializes literal primary-key values through `appendNumericStringToVec`, but that path omitted BOOL and BIT even though typed subqueries already support both physical vector types. This change: - parses BOOL literals with the existing `types.ParseBool` semantics, including `TRUE` and numeric boolean values; - parses BIT literals using the column width so out-of-range values are rejected before entering the filter vector; - adds regression coverage for BOOL literals, BIT(8) boundaries, and the BOOL AST path used by `KEYS(TRUE)`. Tests: - `go test ./pkg/frontend -run '^(TestAppendNumericStringToVec|TestAppendExprToVec)' -count=1` - `go test -race ./pkg/frontend -run '^(TestAppendNumericStringToVec|TestAppendExprToVec)' -count=1` - `go test ./pkg/frontend -count=1` Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…6385) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#26074 ## What this PR does / why we need it: `DATA BRANCH PICK ... KEYS(...)` materializes literal primary-key values through `appendNumericStringToVec`, but that path omitted BOOL and BIT even though typed subqueries already support both physical vector types. This change: - parses BOOL literals with the existing `types.ParseBool` semantics, including `TRUE` and numeric boolean values; - parses BIT literals using the column width so out-of-range values are rejected before entering the filter vector; - adds regression coverage for BOOL literals, BIT(8) boundaries, and the BOOL AST path used by `KEYS(TRUE)`. Tests: - `go test ./pkg/frontend -run '^(TestAppendNumericStringToVec|TestAppendExprToVec)' -count=1` - `go test -race ./pkg/frontend -run '^(TestAppendNumericStringToVec|TestAppendExprToVec)' -count=1` - `go test ./pkg/frontend -count=1` Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…6385) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#26074 ## What this PR does / why we need it: `DATA BRANCH PICK ... KEYS(...)` materializes literal primary-key values through `appendNumericStringToVec`, but that path omitted BOOL and BIT even though typed subqueries already support both physical vector types. This change: - parses BOOL literals with the existing `types.ParseBool` semantics, including `TRUE` and numeric boolean values; - parses BIT literals using the column width so out-of-range values are rejected before entering the filter vector; - adds regression coverage for BOOL literals, BIT(8) boundaries, and the BOOL AST path used by `KEYS(TRUE)`. Tests: - `go test ./pkg/frontend -run '^(TestAppendNumericStringToVec|TestAppendExprToVec)' -count=1` - `go test -race ./pkg/frontend -run '^(TestAppendNumericStringToVec|TestAppendExprToVec)' -count=1` - `go test ./pkg/frontend -count=1` Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #26074
What this PR does / why we need it:
DATA BRANCH PICK ... KEYS(...)materializes literal primary-key values throughappendNumericStringToVec, but that path omitted BOOL and BIT even though typed subqueries already support both physical vector types.This change:
types.ParseBoolsemantics, includingTRUEand numeric boolean values;KEYS(TRUE).Tests:
go test ./pkg/frontend -run '^(TestAppendNumericStringToVec|TestAppendExprToVec)' -count=1go test -race ./pkg/frontend -run '^(TestAppendNumericStringToVec|TestAppendExprToVec)' -count=1go test ./pkg/frontend -count=1