-
Notifications
You must be signed in to change notification settings - Fork 208
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
feat(binder): rewrite column index binding for join support #44
Conversation
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 don't fully understand the details of the code. But in general it looks good to me.
@@ -132,38 +219,93 @@ mod tests { | |||
select_list: vec![ | |||
BoundExpr { | |||
kind: BoundExprKind::ColumnRef(BoundColumnRef { |
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.
The expected AST seems too long. We should find some ways to shorten them in the future.
} | ||
} | ||
|
||
fn bind_column_idx_for_expr(&mut self, expr_kind: &mut BoundExprKind) { |
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.
In DuckDB, the referring indexes to chunks are resolved when transforming logical plan to physical plan:
https://github.com/duckdb/duckdb/blob/c96cc961ec851b63a2624e22127267dbba6c3a66/src/include/duckdb/planner/expression/bound_columnref_expression.hpp#L16
https://github.com/duckdb/duckdb/blob/c96cc961ec851b63a2624e22127267dbba6c3a66/src/include/duckdb/execution/column_binding_resolver.hpp#L17
Should we move it to the physical planner in the future?
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.
Yes, after adding optimizer, we need to move it to the physical planner.
Co-authored-by: Runji Wang <wangrunji0408@163.com>
…ta/risinglight into mingji-inner-join
join
,where
clause and column reference in selection list.