-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-39437][SQL][TEST] Normalize plan id separately in PlanStabilitySuite #36827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -37,7 +37,7 @@ abstract class Exchange extends UnaryExecNode { | |||
override def output: Seq[Attribute] = child.output | |||
final override val nodePatterns: Seq[TreePattern] = Seq(EXCHANGE) | |||
|
|||
override def stringArgs: Iterator[Any] = super.stringArgs ++ Iterator(s"[id=#$id]") | |||
override def stringArgs: Iterator[Any] = super.stringArgs ++ Iterator(s"[plan_id=$id]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM. Yes, I expected this kind of massive PR. :)
Could you fix more test failures?
|
More golden files need to be re-generated. Working on it now. |
…bilitySuite backport #36827 ### What changes were proposed in this pull request? In `PlanStabilitySuite`, we normalize expression IDs by matching `#\d+` in the explain string. However, this regex can match plan id in `Exchange` node as well, which will mess up the normalization if expression IDs and plan IDs overlap. This PR normalizes plan id separately in `PlanStabilitySuite`. ### Why are the changes needed? Make the plan golden file more stable. ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? N/A Closes #36828 from cloud-fan/test2. Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Merged to master. Thank you, @cloud-fan and @HyukjinKwon . |
Oh,
I verified that it's stable locally.
|
Ah, I found that it is ANSI mode test. Let me make a follow-up. |
### What changes were proposed in this pull request? This is a follow-up of #36827 to update `q83.ansi` result. ### Why are the changes needed? ANSI mode unit tests are not covered on GitHub Action on PRs. - https://github.com/apache/spark/commits/master ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? This should be tested manually because `GitHub Action` doesn't test this. ``` $ SPARK_ANSI_SQL_MODE=true build/sbt "sql/testOnly *PlanStabilitySuite" ``` Closes #36836 from dongjoon-hyun/SPARK-39437. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
### What changes were proposed in this pull request? This is a follow-up of #36827 to update `q83.sf100.ansi` result. ### Why are the changes needed? ANSI mode unit tests are not covered on GitHub Action on PRs. - https://github.com/apache/spark/commits/master ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? This should be tested manually because `GitHub Action` doesn't test this. ``` $ SPARK_ANSI_SQL_MODE=true build/sbt "sql/testOnly *PlanStabilityWithStatsSuite" ``` Closes #36838 from dongjoon-hyun/SPARK-39437-2. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
…ySuite In `PlanStabilitySuite`, we normalize expression IDs by matching `#\d+` in the explain string. However, this regex can match plan id in `Exchange` node as well, which will mess up the normalization if expression IDs and plan IDs overlap. This PR normalizes plan id separately in `PlanStabilitySuite`. Make the plan golden file more stable. no N/A Closes apache#36827 from cloud-fan/test. Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
…bilitySuite ### What changes were proposed in this pull request? In `PlanStabilitySuite`, we normalize expression IDs by matching `#\d+` in the explain string. However, this regex can match plan id in `Exchange` node as well, which will mess up the normalization if expression IDs and plan IDs overlap. This PR normalizes plan id separately in `PlanStabilitySuite`. ### Why are the changes needed? Make the plan golden file more stable. ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? N/A backport #36827 Closes #36854 from cloud-fan/test2. Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
…bilitySuite backport apache#36827 ### What changes were proposed in this pull request? In `PlanStabilitySuite`, we normalize expression IDs by matching `#\d+` in the explain string. However, this regex can match plan id in `Exchange` node as well, which will mess up the normalization if expression IDs and plan IDs overlap. This PR normalizes plan id separately in `PlanStabilitySuite`. ### Why are the changes needed? Make the plan golden file more stable. ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? N/A Closes apache#36828 from cloud-fan/test2. Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
What changes were proposed in this pull request?
In
PlanStabilitySuite
, we normalize expression IDs by matching#\d+
in the explain string. However, this regex can match plan id inExchange
node as well, which will mess up the normalization if expression IDs and plan IDs overlap.This PR normalizes plan id separately in
PlanStabilitySuite
.Why are the changes needed?
Make the plan golden file more stable.
Does this PR introduce any user-facing change?
no
How was this patch tested?
N/A