Repository navigation
test: cover prepared IN in nested PK filter - #27558
Conversation
XuPeng-SH
left a comment
There was a problem hiding this comment.
The added case is duplicate coverage rather than a new regression axis.
test/distributed/cases/optimizer/pk_filter_nested_boolean.sql, merged by #27521, already creates the same five tables and executes the same prepared information_schema.tables ... table_name IN (?,?,?,?,?) query with the same five-row oracle. The new literal query does not add an independent failure detector: both queries are still checked against the same fixed rows, and the existing prepared case already proves the externally visible result.
More importantly, #27503 and #27521 document that #26627's cast makes this exact information_schema query bypass PK pruning on main. Therefore this fixture passes even without the nested-OR root fix and cannot detect a regression of the defect it claims to cover. The existing #27521 BVT adds mixed AND/OR cases that actually reach the faulty merge path, plus this exact public prepared query.
The current CI artifact confirms both files ran successfully in the same pessimistic BVT job (pk_filter_nested_boolean: 29/29, 0.256s; prepared_in_equivalence: 19/19, 0.220s), so validation is no longer missing, but it also confirms the duplicated recurring BVT cost.
Please close this PR as superseded by #27521, or replace it with a genuinely distinct reachable behavior/failure axis that is not already covered.
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? |
|
Addressed in 7267e2d. The duplicated information_schema fixture was replaced with a distinct reachable axis on a normal VARCHAR primary key: server PREPARE reuse with |
aptend
left a comment
There was a problem hiding this comment.
Deep re-review completed on exact head 7267e2d5098dc25a6cb7ffa5c8c6ceb9c2e89d29, including the prior CHANGES_REQUESTED review, the author response, the complete diff, and the delta from reviewed head df5d181a2dd8d1c961c4dbd7e56c7bfcba89d419. The previous blocker is closed: the duplicated information_schema fixture was fully replaced by a normal VARCHAR primary-key query that reaches (prepared IN OR range) AND range without the #26627 cast bypass, and reuses one PREPARE across two materially different bindings. This is distinct from #27521's equality/range operand-order BVT while retaining a small deterministic oracle. CI confirms the new SQL file is included in the passing BVT job. Local full pkg/vm/engine/readutil and pkg/sql/plan tests passed; focused readutil race passed for 10 iterations; vet and diff checks passed. No blocking issues found.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep re-reviewed exact head 7267e2d5098dc25a6cb7ffa5c8c6ceb9c2e89d29.
The previous duplicate/unreachable-fixture blocker is closed. The replacement test uses a normal VARCHAR primary key and reaches the actual (prepared IN OR range) AND outer range BasePKFilter container merge without depending on the information_schema cast bypass. Its two bindings have small deterministic oracles, exercise materially different branches, and reuse the same prepared statement so stale runtime specialization is observable. This is distinct from #27521's equality/range operand-order cases.
I also checked SQL/result alignment, surrounding BVT coverage, cleanup, and diff cleanliness. Current CI includes the new BVT and is green. No blocking implementation or test-design issue found.
|
Tick the box to add this pull request to the merge queue (same as
|
## Summary - replace the duplicated information_schema fixture called out in review #5013529566 - exercise a genuinely distinct reachable axis on a normal VARCHAR primary key - cover server PREPARE reuse with `a <= ? AND (a IN (?,?,?) OR a > ?)` across two bindings ## Why this is distinct - the case reaches the nested disjunction/container merge through a prepared `IN` plus a range arm - it does not depend on the information_schema cast path from matrixorigin#26627 - it is different from the existing equality/range operand-order cases in matrixorigin#27521 ## Validation - `go test ./pkg/vm/engine/readutil -run ^TestConstructBasePKFilterWithOr$ -count=1` - `go test ./pkg/sql/plan -run TestDoMergeFiltersOnCompositeKey -count=1` - `go test ./pkg/sql/plan -run TestInRHSValues -count=1` - SQL/result statement and expected-row alignment checked - `git diff --check` passed The shared local MatrixOne listener was not used because mo-tester performs destructive global cleanup; the updated fixture is ready for the repository BVT/CI environment. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## Summary - replace the duplicated information_schema fixture called out in review #5013529566 - exercise a genuinely distinct reachable axis on a normal VARCHAR primary key - cover server PREPARE reuse with `a <= ? AND (a IN (?,?,?) OR a > ?)` across two bindings ## Why this is distinct - the case reaches the nested disjunction/container merge through a prepared `IN` plus a range arm - it does not depend on the information_schema cast path from matrixorigin#26627 - it is different from the existing equality/range operand-order cases in matrixorigin#27521 ## Validation - `go test ./pkg/vm/engine/readutil -run ^TestConstructBasePKFilterWithOr$ -count=1` - `go test ./pkg/sql/plan -run TestDoMergeFiltersOnCompositeKey -count=1` - `go test ./pkg/sql/plan -run TestInRHSValues -count=1` - SQL/result statement and expected-row alignment checked - `git diff --check` passed The shared local MatrixOne listener was not used because mo-tester performs destructive global cleanup; the updated fixture is ready for the repository BVT/CI environment. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## Summary - replace the duplicated information_schema fixture called out in review #5013529566 - exercise a genuinely distinct reachable axis on a normal VARCHAR primary key - cover server PREPARE reuse with `a <= ? AND (a IN (?,?,?) OR a > ?)` across two bindings ## Why this is distinct - the case reaches the nested disjunction/container merge through a prepared `IN` plus a range arm - it does not depend on the information_schema cast path from matrixorigin#26627 - it is different from the existing equality/range operand-order cases in matrixorigin#27521 ## Validation - `go test ./pkg/vm/engine/readutil -run ^TestConstructBasePKFilterWithOr$ -count=1` - `go test ./pkg/sql/plan -run TestDoMergeFiltersOnCompositeKey -count=1` - `go test ./pkg/sql/plan -run TestInRHSValues -count=1` - SQL/result statement and expected-row alignment checked - `git diff --check` passed The shared local MatrixOne listener was not used because mo-tester performs destructive global cleanup; the updated fixture is ready for the repository BVT/CI environment. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Summary
a <= ? AND (a IN (?,?,?) OR a > ?)across two bindingsWhy this is distinct
INplus a range armValidation
go test ./pkg/vm/engine/readutil -run ^TestConstructBasePKFilterWithOr$ -count=1go test ./pkg/sql/plan -run TestDoMergeFiltersOnCompositeKey -count=1go test ./pkg/sql/plan -run TestInRHSValues -count=1git diff --checkpassedThe shared local MatrixOne listener was not used because mo-tester performs destructive global cleanup; the updated fixture is ready for the repository BVT/CI environment.