-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Create new datafusion-optimizer crate for logical optimizer rules
#2675
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
15f1e75 to
99d2f20
Compare
datafusion-optimizer crate for logical optimizer rulesdatafusion-optimizer crate for logical optimizer rules
tustvold
left a comment
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.
This seems sensible to me, I think some code should be being moved instead of copied though
| @@ -0,0 +1,80 @@ | |||
| // Licensed to the Apache Software Foundation (ASF) under one | |||
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.
This appears to be duplicating the file from core, instead of moving it. Is this intentional?
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.
@tustvold Thanks. I hadn't realized that this was only used by the optimizer test. I have now moved this instead,
| pub mod user_defined; | ||
|
|
||
| /// some tests share a common table with different names | ||
| pub fn test_table_scan_with_name(name: &str) -> Result<LogicalPlan> { |
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.
These functions don't appear to be being used by any tests that haven't also been moved, so perhaps they could be removed from core also?
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.
I have removed this from core now
alamb
left a comment
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.
LGTM -- thanks @andygrove and @tustvold
Which issue does this PR close?
Closes #2599
Rationale for this change
As a user of DataFusion for SQL query planning, I would like to be able to use the logical plan optimizer rules without depending on the full datafusion crate containing the execution engine.
What changes are included in this PR?
datafusion-optimizercratesimplify_expressionsto the new crate (see Logical optimizer rule "simplify expressions" should not depend on the core datafusion crate #2535 for the reason this one rule cannot yet be moved)Are there any user-facing changes?
I added public re-exports for now to maintain API compatibility but there is a new crate so technically this is probably still an API change.
Does this PR break compatibility with Ballista?
No