-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
refactor code about query -> plan
for subqueries
#4559
Conversation
let logical_plan = self.query_to_plan_with_alias( | ||
*cte.query, | ||
None, | ||
&mut planner_context.clone(), | ||
outer_query_schema, | ||
)?; |
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.
just subquery -> plan
need to pass outer_query_schema.
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.
Very nice change @jackwener
&self, | ||
query: Query, | ||
alias: Option<String>, | ||
planner_context: &mut PlannerContext, | ||
outer_query_schema: Option<&DFSchema>, |
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.
👍
} | ||
|
||
/// Generate a logic plan from an SQL query with optional alias | ||
pub fn query_to_plan_with_alias( | ||
/// Generate a logic plan from an SQL query. |
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 API makes a lot of sense -- thank you @jackwener
query -> plan
query -> plan
for subqueries
Which issue does this PR close?
Closes #.
Rationale for this change
After #4484 #4141 , we remove the alias in
query_to_plan()
, so we can remove it.What's more, we can find just
subquery_to_plan
need to passouter_schema
.What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?