Skip to content

Commit

Permalink
Fix print of alias and the output of joins
Browse files Browse the repository at this point in the history
  • Loading branch information
mamcx committed Jan 13, 2025
1 parent 7b0ac9c commit 305e0bc
Show file tree
Hide file tree
Showing 3 changed files with 316 additions and 165 deletions.
13 changes: 6 additions & 7 deletions crates/physical-plan/src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,12 @@ pub fn compile(ast: StatementCtx<'_>) -> PhysicalCtx<'_> {
self.next.into()
}
}
let mut var = Interner {
next: 0,
names: HashMap::new(),
};
let plan = match ast.statement {
Statement::Select(expr) => compile_project_list(
&mut Interner {
next: 0,
names: HashMap::new(),
},
expr,
),
Statement::Select(expr) => compile_project_list(&mut var, expr),
_ => {
unreachable!("Only `SELECT` is implemented")
}
Expand All @@ -177,6 +175,7 @@ pub fn compile(ast: StatementCtx<'_>) -> PhysicalCtx<'_> {
PhysicalCtx {
plan,
sql: ast.sql,
vars: var.names,
source: ast.source,
planning_time: ast.planning_time,
}
Expand Down
Loading

0 comments on commit 305e0bc

Please sign in to comment.