-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Extract EmptyRelation
, Limit
, Values
from LogicalPlan
#1325
Conversation
f66b2ce
to
b807f23
Compare
@alamb PTAL |
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.
Thanks @liukun4515
/// The logical plan | ||
input: Arc<LogicalPlan>, | ||
}, | ||
Limit(Limit), |
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.
Using a different name will be better, such as LimitPlan
, keep the same as others.
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 actually think the way this PR is written, Limit(Limit)
is more consistent. The only one that seems to follow a different pattern is TableScanPlan
(which we should perhaps rename to TableScan
?)
@@ -107,7 +107,7 @@ impl OptimizerRule for ConstantFolding { | |||
|
|||
utils::from_plan(plan, &expr, &new_inputs) | |||
} | |||
LogicalPlan::TableScan { .. } | LogicalPlan::EmptyRelation { .. } => { | |||
LogicalPlan::TableScan { .. } | LogicalPlan::EmptyRelation(_) => { |
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.
nit: keep consistent. { .. }
(_)
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.
perhaps we can do this in a follow on pr. Good spot @xudong963
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.
@xudong963 @alamb
I might miss this point when write the code.
After all the extracting logical plan, i will file a followup pull request to keep consistent.
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 merged the PR in before you had a chance to respond to this comment -- so it was my fault :) )
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 think it looks good. Thanks @liukun4515 !
Merged this one in to minimize conflicts with other outstanding PRs |
EmptyRelation
, Limit
, Values
from LogicalPlan
Which issue does this PR close?
Closes #1305
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?