Repository navigation
Minor: Add getter for logical optimizer rules - #12379
Merged
Merged
Conversation
Contributor
Author
|
This is my first time contributing. Please let me know if I missed any. Tagging for CI, @alamb @andygrove |
Dandandan
approved these changes
Sep 7, 2024
Weijun-H
approved these changes
Sep 8, 2024
|
|
||
| #[test] | ||
| fn test_session_state_with_optimizer_rules() { | ||
| // test building sessions with supplied rules |
Member
There was a problem hiding this comment.
nit
Suggested change
| // test building sessions with supplied rules | |
| struct DummyRule {} | |
| impl OptimizerRule for DummyRule { | |
| fn name(&self) -> &str { | |
| "dummy_rule" | |
| } | |
| } | |
| // test building sessions with supplied rules |
Contributor
Author
Comment on lines
+1952
to
+1959
|
|
||
| struct DummyRule {} | ||
|
|
||
| impl OptimizerRule for DummyRule { | ||
| fn name(&self) -> &str { | ||
| "dummy_rule" | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
nit
Suggested change
| struct DummyRule {} | |
| impl OptimizerRule for DummyRule { | |
| fn name(&self) -> &str { | |
| "dummy_rule" | |
| } | |
| } |
Member
|
Thanks @maronavenue for contribution and @Dandandan for review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
N/A
Rationale for this change
My team and I have been exploring Datafusion's potential to federate our custom sources performantly. Part of that is tuning optimizers depending on our needs. Noticed that there isn't a convenience method in
SessionStateyet that returns logical optimizer rules compared to its physical counterpart. Would be great for our POC work to quickly inspect them outside (and/or alongside) debugger or observer.What changes are included in this PR?
Adds a getter method
optimizers()inSessionStatein parity to thephysical_optimizers()counterpart.Are these changes tested?
Yes, ran new and existing tests. Also manually tested from our existing POC code.
Are there any user-facing changes?
Examples: