File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
datafusion/core/src/logical_plan Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -585,10 +585,13 @@ impl LogicalPlanBuilder {
585585
586586 expr. extend ( missing_exprs) ;
587587
588- let new_schema = DFSchema :: new_with_metadata (
588+ let mut new_schema = DFSchema :: new_with_metadata (
589589 exprlist_to_fields ( & expr, & input) ?,
590590 input_schema. metadata ( ) . clone ( ) ,
591591 ) ?;
592+ if let Some ( alias) = alias. as_deref ( ) {
593+ new_schema = new_schema. replace_qualifier ( alias) ;
594+ }
592595
593596 Ok ( LogicalPlan :: Projection ( Projection {
594597 expr,
@@ -671,10 +674,13 @@ impl LogicalPlanBuilder {
671674
672675 expr. extend ( missing_exprs) ;
673676
674- let new_schema = DFSchema :: new_with_metadata (
677+ let mut new_schema = DFSchema :: new_with_metadata (
675678 exprlist_to_fields ( & expr, & input) ?,
676679 input_schema. metadata ( ) . clone ( ) ,
677680 ) ?;
681+ if let Some ( alias) = alias. as_deref ( ) {
682+ new_schema = new_schema. replace_qualifier ( alias) ;
683+ }
678684
679685 Ok ( LogicalPlan :: Projection ( Projection {
680686 expr,
You can’t perform that action at this time.
0 commit comments