planner: fix join reorder schema mismatch with full schema columns#66116
planner: fix join reorder schema mismatch with full schema columns#66116hawkingrei wants to merge 9 commits intopingcap:masterfrom
Conversation
|
Skipping CI for Draft Pull Request. |
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@hawkingrei: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
@hawkingrei: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: close #66106, close #66107, close #66108
Problem Summary:
Join reorder may build intermediate join trees whose output schema misses columns referenced by remaining join predicates, causing planner failures like
Can't find column.In addition, reports-based regression replay previously depended on local ad-hoc report folders, making coverage non-deterministic.
What changed and how does it work?
pkg/planner/core/casetest/join/join_test.go(TestCantFindColumnJoinReorder).pkg/planner/core/casetest/join/reports_test.gopkg/planner/core/casetest/join/testdata/reports/case_65454/*pkg/planner/core/casetest/join/BUILD.bazelpkg/planner/core/rule_join_reorder.go:FullSchemawhen checking predicate ownership during reorderpkg/planner/core/operator/logicalop/logical_join.go:FullSchemaCheck List
Tests
Manual test scripts:
go test -run TestCantFindColumnJoinReorder --tags=intest ./pkg/planner/core/casetest/join -count=1go test -run TestReportsCantFindColumn --tags=intest ./pkg/planner/core/casetest/join -count=1go test -run TestLeadingHintInapplicableKeepsOtherConds --tags=intest ./pkg/planner/core/casetest/rule -count=1Side effects
Documentation
Release note