andygrove commented on a change in pull request #7796:
URL: https://github.com/apache/arrow/pull/7796#discussion_r459011360



##########
File path: rust/datafusion/src/execution/context.rs
##########
@@ -455,12 +495,11 @@ impl ExecutionContext {
         input_schema: &Schema,
     ) -> Result<Arc<dyn PhysicalExpr>> {
         match e {
-            Expr::Alias(expr, name) => {
-                let expr = self.create_physical_expr(expr, input_schema)?;
-                Ok(Arc::new(Alias::new(expr, &name)))
-            }
-            Expr::Column(i) => {
-                Ok(Arc::new(Column::new(*i, &input_schema.field(*i).name())))
+            Expr::Alias(expr, ..) => Ok(self.create_physical_expr(expr, 
input_schema)?),

Review comment:
       Ok, so the schema for these physical operators is based on the logical 
schema? I guess I just want to be sure that the alias name is preserved in the 
query results.
   
   A unit test demonstrating this would be good.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to