Repository navigation
planner, executor: standardize how EXPLAIN output is formatted in testkit.Rows - #67270
Conversation
…testkit.Rows` Most existing tests that check `EXPLAIN` plan output use separate arguments for each line. For example: ``` tk.MustQuery(`explain format='plan_tree' select * from t1 join t2 on t1.a=t2.b where t1.a in (1,2);`).Check(testkit.Rows( `HashJoin root inner join, equal:[eq(test.t1.a, test.t2.b)]`, `├─Batch_Point_Get(Build) root table:t1 handle:[1 2], keep order:false, desc:false`, `└─TableReader(Probe) root MppVersion: 3, data:ExchangeSender`, ` └─ExchangeSender mpp[tiflash] ExchangeType: PassThrough`, ` └─TableFullScan mpp[tiflash] table:t2 pushed down filter:in(test.t2.b, 1, 2), not(isnull(test.t2.b)), keep order:false, stats:pseudo`)) ``` However, a couple of tests instead tests used a single concatenated string with literal `]\n[` separators, instead of separate arguments to `testkit.Rows()`. This worked because `testkit.Rows` splits on `\n` and strips brackets. Instead, convert these two tests to use separate arguments, like all of the other tests that check `EXPLAIN` output.
|
Review Complete Findings: 0 issues ℹ️ Learn more details on Pantheon AI. |
|
Hi @henrybw. 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo test files are updated to refactor Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.11.3)Command failed Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/ok-to-test |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #67270 +/- ##
================================================
+ Coverage 77.8044% 78.0235% +0.2191%
================================================
Files 2022 1942 -80
Lines 554886 548119 -6767
================================================
- Hits 431726 427662 -4064
+ Misses 121416 120440 -976
+ Partials 1744 17 -1727
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
[LGTM Timeline notifier]Timeline:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 0xPoe, qw4990, 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 |
|
/retest-required |
1 similar comment
|
/retest-required |
What problem does this PR solve?
Issue Number: close #67269
Problem Summary:
Most existing tests that check
EXPLAINplan output use separate arguments for each line. For example:However, a couple of tests instead tests used a single concatenated string with literal
]\n[separators, instead of separate arguments totestkit.Rows(), like this:While this worked because
testkit.Rowssplits on\nand strips brackets, it is unnecessarily inconsistent with every other test case that checksEXPLAINoutput.What changed and how does it work?
Instead, convert these two tests to use separate arguments, like all of the other tests that check
EXPLAINoutput:pkg/planner/core/integration_test.go(TestAggPushToCopForCachedTable)pkg/executor/test/showtest/show_test.go(TestShow2)No functional changes.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit