-
Couldn't load subscription status.
- Fork 28.9k
[SPARK-33621][SQL] Add a way to inject data source rewrite rules #30577
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
|
We should probably wait for clarity on the discussion here before moving on with this one. |
|
cc @gatorsmile |
|
This looks good to me, but I agree that we should change the name if anyone comes up with a better one. |
sql/core/src/test/scala/org/apache/spark/sql/SparkSessionExtensionSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/SparkSessionExtensions.scala
Outdated
Show resolved
Hide resolved
|
Test build #132072 has finished for PR 30577 at commit
|
|
I'll wait to update this until we resolve the name issue. |
|
@aokolnychyi . Could you address the existing comments first without waiting for the others? They are orthogonal. You don't need to wait. For example,
|
|
Will do today, @dongjoon-hyun! |
|
Gentle ping, @aokolnychyi .
|
| def injectOptimizerRule(builder: RuleBuilder): Unit = { | ||
| optimizerRules += builder | ||
| } | ||
|
|
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.
Could you update the description above, too?
spark/sql/core/src/main/scala/org/apache/spark/sql/SparkSessionExtensions.scala
Lines 37 to 48 in 29096a8
| * This current provides the following extension points: | |
| * | |
| * <ul> | |
| * <li>Analyzer Rules.</li> | |
| * <li>Check Analysis Rules.</li> | |
| * <li>Optimizer Rules.</li> | |
| * <li>Planning Strategies.</li> | |
| * <li>Customized Parser.</li> | |
| * <li>(External) Catalog listeners.</li> | |
| * <li>Columnar Rules.</li> | |
| * <li>Adaptive Query Stage Preparation Rules.</li> | |
| * </ul> |
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.
Done, thanks for catching this!
|
Sorry for the delay, @dongjoon-hyun! I've updated the PR now. |
|
Gentle ping @gatorsmile on the name suggestion discussed here. |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #132361 has finished for PR 30577 at commit
|
|
Test failures are in |
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. Thank you for updating, @aokolnychyi .
Merged to master for Apache Spark 3.2.0.
What changes were proposed in this pull request?
This PR adds a way to inject data source rewrite rules.
Why are the changes needed?
Right now
SparkSessionExtensionsallow us to inject optimization rules but they are added to operator optimization batch. There are cases when users need to run rules after the operator optimization batch (e.g. cases when a rule relies on the fact that expressions have been optimized). Currently, this is not possible.Does this PR introduce any user-facing change?
Yes.
How was this patch tested?
This PR comes with a new test.