planner: make rule tests ignore plan-id with explain format as brief#66013
planner: make rule tests ignore plan-id with explain format as brief#66013ti-chi-bot[bot] merged 3 commits intopingcap:masterfrom
Conversation
|
Hi @lostcache. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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. |
|
Hi @lostcache. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
/ok-to-test |
There was a problem hiding this comment.
Pull request overview
This PR modifies test cases to use EXPLAIN FORMAT = 'brief' instead of plain EXPLAIN to avoid including plan IDs in test result files. Plan IDs are sequentially allocated based on the optimization flow, and including them in test results makes tests brittle when optimization changes occur.
Changes:
- Modified test files to add
format = 'brief'to EXPLAIN statements - Updated expected result files to reflect the removal of plan IDs from output
- Affected test files: rule_result_reorder, rule_constant_propagation, and dual tests
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integrationtest/t/planner/core/rule_result_reorder.test | Added format = 'brief' to 2 EXPLAIN statements |
| tests/integrationtest/t/planner/core/rule_constant_propagation.test | Added FORMAT = 'brief' to 4 EXPLAIN statements |
| tests/integrationtest/r/planner/core/rule_result_reorder.result | Updated expected output to show operator names without plan IDs (e.g., Limit instead of Limit_13) |
| tests/integrationtest/r/planner/core/rule_constant_propagation.result | Updated expected output to show operator names without plan IDs |
| pkg/planner/core/casetest/rule/dual_test.go | Added format = 'brief' to all EXPLAIN statements and updated expected output |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #66013 +/- ##
================================================
- Coverage 77.7600% 77.6644% -0.0956%
================================================
Files 2001 1923 -78
Lines 546165 535349 -10816
================================================
- Hits 424698 415776 -8922
+ Misses 119805 119555 -250
+ Partials 1662 18 -1644
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fixdb, terry1purcell The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: ref #60940
Problem Summary: Some explain-test cases will record the plan ID in the result file, which will be a burden when some optimization flow is changed, since plan ID allocation is sequential according to the allocation order or space.
What changed and how does it work?
Made rule dual, constant propagation and result reorder tests ignore plan-id with explain format as brief.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.