Skip to content
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

[SPARK-32469][SQL] ApplyColumnarRulesAndInsertTransitions should be idempotent #29273

Closed
wants to merge 1 commit into from

Conversation

cloud-fan
Copy link
Contributor

What changes were proposed in this pull request?

This PR makes ApplyColumnarRulesAndInsertTransitions idempotent (assuming the custom columnar rules are also idempotent).

Why are the changes needed?

It's good hygiene to keep rules idempotent

Does this PR introduce any user-facing change?

No

How was this patch tested?

new suite

@cloud-fan
Copy link
Contributor Author

cc @andygrove @tgravescs @maryannxue

@@ -490,8 +490,10 @@ case class ApplyColumnarRulesAndInsertTransitions(conf: SQLConf, columnarRules:
// The tree feels kind of backwards
// Columnar Processing will start here, so transition from row to columnar
RowToColumnarExec(insertTransitions(plan))
} else {
} else if (!plan.isInstanceOf[RowToColumnarExec]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had gone down the same path at one point with similar changes, but then had to introduce a new RowToColumnarExecLike trait so that it would also work with the GpuRowToColumnarExec implementation that we have in our plugin.

Copy link
Contributor Author

@cloud-fan cloud-fan Jul 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean https://github.com/apache/spark/pull/29067/files#diff-3a92abd70b28650055b16d8a101a95c3R55 ?

I can wait for it to be merged, and add something similar for RowToColumnarExec.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly like that.

@SparkQA
Copy link

SparkQA commented Jul 28, 2020

Test build #126727 has finished for PR 29273 at commit 50d46d9.

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

@tgravescs
Copy link
Contributor

@revans2

@SparkQA
Copy link

SparkQA commented Aug 3, 2020

Test build #126982 has finished for PR 29273 at commit a1b5664.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class RowToColumnarExec(child: SparkPlan) extends RowToColumnarTransition

Copy link
Contributor

@tgravescs tgravescs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes lgtm.

@cloud-fan
Copy link
Contributor Author

thanks for review, merging to master!

@cloud-fan cloud-fan closed this in 8659ec5 Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants