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/03/07 21:37:42 UTC

[GitHub] [arrow-datafusion] alamb commented on a change in pull request #1941: Pruning serialization

alamb commented on a change in pull request #1941:
URL: https://github.com/apache/arrow-datafusion/pull/1941#discussion_r821123794



##########
File path: datafusion/src/physical_optimizer/pruning.rs
##########
@@ -143,6 +145,7 @@ impl PruningPredicate {
             schema,
             predicate_expr,
             required_columns,
+            logical_expr: expr.clone(),

Review comment:
       It might be worth considering changing the signature of this function from `
   
   ```rust
   pub fn try_new(expr: &Expr, schema: SchemaRef) -> Result<Self> {
   ``` 
   
   to take the Expr directly rather than `clone` within 
   
   ```rust
   pub fn try_new(expr: Expr, schema: SchemaRef) -> Result<Self> {
   ```
   
   The rationale would be if the caller already has a `Expr` they could pass it in rather than forcing a copy. 




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