[SPARK-32984][TESTS][SQL] Improve showing the differences between approved and actual plans of PlanStabilitySuite#29860
Conversation
|
cc @cloud-fan @maropu Please take a look, thanks! |
|
Looks |
|
I remember we changed to showing plans one by one instead of side by side because of the TPCDS plans are usually too big to be shown in a good shape using side by side. We want to first keep the plan shape and then highlight the difference. |
|
Test build #129060 has finished for PR 29860 at commit
|
|
retest this please |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #129099 has finished for PR 29860 at commit
|
| */ | ||
| private def addDiffHint(approvedSimplified: String, actualSimplified: String) | ||
| : (String, String) = { | ||
| // reverse the plan so we can compare the node from the bottom to top |
There was a problem hiding this comment.
One hard problem is how to match the lines from both sides. It's possible that the left side has one more node in the middle, so simply matching lines bottom-up may not work. It's like git diff, we should do the match w.r.t. the content, which can be very complicated.
Maybe we should just recommend some online text diff tools in the comment and ask people to use.
|
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
What changes were proposed in this pull request?
This PR proposes to add the caret hints, e.g.,
^^^^^, to the approved and actual plans where they first become different.Why are the changes needed?
It's hard to find the difference between the approved and actual plan since the plans of TPC-DS queries are often huge. Adding the hints would help developers to locate the plan differences quickly.
Does this PR introduce any user-facing change?
Yes, after this change, there're hits added to the plans to highlight the differences. For example,
To be honest, the result is still not perfect when plans are super huge and your monitor can not hold it. But at least now we can have a way to search the differences.
How was this patch tested?
Tested manually.