Skip to content

Commit

Permalink
fix: fix issue 10326, handle Expr::Alias
Browse files Browse the repository at this point in the history
  • Loading branch information
lichuang committed Mar 6, 2025
1 parent c135e35 commit e9d5a78
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions datafusion/sql/src/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
});
}
Expr::Alias(alias) => {
// in `Expr::Alias`, we also need to add alias columns
let expr = alias.expr.as_ref();
expr_columns.extend(expr.column_refs());

let column = Column::new(alias.relation.clone(), alias.name.clone());
wildcard_columns.push(column);
}
Expand Down

0 comments on commit e9d5a78

Please sign in to comment.