Skip to content

Conversation

@tanelk
Copy link
Contributor

@tanelk tanelk commented Sep 25, 2020

What changes were proposed in this pull request?

Mark the "Join Reorder" batch as idempotent.
The CostBasedJoinReorder needed a slight modification to satisfy this rule.

There are some changes in the plan stability suite. They are caused by changing the iteration order in CostBasedJoinReorder.

Why are the changes needed?

Idempotence check on optimizer batches is invaluable for developers. It can avoid us bugs in the future.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing UTs mostly cover it, also added one extra

@tanelk
Copy link
Contributor Author

tanelk commented Sep 25, 2020

@LuciferYang, it seems you were working on similar issue, but you closed it - #29638

@SparkQA
Copy link

SparkQA commented Sep 25, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33736/

@SparkQA
Copy link

SparkQA commented Sep 25, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33737/

@SparkQA
Copy link

SparkQA commented Sep 25, 2020

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33736/

@SparkQA
Copy link

SparkQA commented Sep 25, 2020

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33737/

@tanelk
Copy link
Contributor Author

tanelk commented Sep 25, 2020

Closing for now, because there is some issue with the golden files

@tanelk tanelk closed this Sep 25, 2020
@SparkQA
Copy link

SparkQA commented Sep 25, 2020

Test build #129118 has finished for PR 29871 at commit 7a44562.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 25, 2020

Test build #129116 has finished for PR 29871 at commit d58966c.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@LuciferYang
Copy link
Contributor

LuciferYang commented Sep 27, 2020

If there are multiple candidate plans with same cost, I think different inputs produce different outputs is reasonable,so only need ensure the same behavior in Scala 2.12 and Scala 2.13

@tanelk tanelk reopened this Sep 27, 2020
@tanelk
Copy link
Contributor Author

tanelk commented Sep 27, 2020

If there are multiple candidate plans with same cost, I think different inputs produce different outputs is reasonable,so only need ensure the same behavior in Scala 2.12 and Scala 2.13

With this change optimally ordered input doesn't get reordered into another plan with the same cost - this makes CostBasedJoinReorder idempotent, that can help catch bugs.

I had a wrong approach to solving this earlier, now it should stable.

@SparkQA
Copy link

SparkQA commented Sep 27, 2020

Test build #129154 has finished for PR 29871 at commit c9028ad.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 27, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33769/

@SparkQA
Copy link

SparkQA commented Sep 27, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33770/

@SparkQA
Copy link

SparkQA commented Sep 27, 2020

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33769/

@SparkQA
Copy link

SparkQA commented Sep 27, 2020

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33770/

@SparkQA
Copy link

SparkQA commented Sep 28, 2020

Test build #129155 has finished for PR 29871 at commit 4619acc.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@LuciferYang
Copy link
Contributor

Does this PR affect the behavior in Scala 2.13? Can you help verify it offline?

@maropu
Copy link
Member

maropu commented Sep 28, 2020

Have you checked actuall performance changes with sf=100? I think it would be better to check them for avoiding accidental performance regression.

@SparkQA
Copy link

SparkQA commented Jan 5, 2021

Test build #133658 has finished for PR 29871 at commit 6248e4a.

  • This patch passes all tests.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@tanelk
Copy link
Contributor Author

tanelk commented Jan 5, 2021

Now that #30965 is merged, this changes the plans a lot less.
But there is still idempotency issue with plans with equal costs.

@SparkQA
Copy link

SparkQA commented Jan 5, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38274/

@SparkQA
Copy link

SparkQA commented Jan 5, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38274/

@SparkQA
Copy link

SparkQA commented Jan 5, 2021

Test build #133685 has finished for PR 29871 at commit f815feb.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 16, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38731/

@SparkQA
Copy link

SparkQA commented Jan 16, 2021

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38731/

@SparkQA
Copy link

SparkQA commented Jan 16, 2021

Test build #134148 has finished for PR 29871 at commit f7744db.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 26, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39101/

@SparkQA
Copy link

SparkQA commented Jan 26, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39102/

@SparkQA
Copy link

SparkQA commented Jan 26, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39102/

@SparkQA
Copy link

SparkQA commented Jan 26, 2021

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39101/

@SparkQA
Copy link

SparkQA commented Jan 26, 2021

Test build #134517 has finished for PR 29871 at commit 5fe5f3b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Mar 20, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/40862/

@SparkQA
Copy link

SparkQA commented Mar 20, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/40862/

@SparkQA
Copy link

SparkQA commented Mar 20, 2021

Test build #136280 has finished for PR 29871 at commit d6522d9.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Apr 2, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41428/

@SparkQA
Copy link

SparkQA commented Apr 2, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41428/

@SparkQA
Copy link

SparkQA commented Apr 2, 2021

Test build #136850 has finished for PR 29871 at commit d2a6128.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@github-actions
Copy link

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.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@github-actions github-actions bot added the Stale label Jul 12, 2021
@github-actions github-actions bot closed this Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants