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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]