You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/14 15:20:25 UTC

[GitHub] [arrow-datafusion] andygrove commented on a diff in pull request #2900: Add `Projection::try_new` and `Projection::try_new_with_schema`

andygrove commented on code in PR #2900:
URL: https://github.com/apache/arrow-datafusion/pull/2900#discussion_r921260745


##########
datafusion/optimizer/src/common_subexpr_eliminate.rs:
##########
@@ -289,15 +289,11 @@ fn build_project_plan(
         }
     }
 
-    let mut schema = DFSchema::new_with_metadata(fields, HashMap::new())?;
-    schema.merge(input.schema());

Review Comment:
   ~This is the fix for https://github.com/apache/arrow-datafusion/issues/2907. This code is incorrect and is producing a projection output schema containing all the fields from the input schema. The code now just relies on the logic in `Projection::try_new` to produce a valid schema based on the projection expressions.~
   
   No, it wasn't the fix.



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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