Dandandan commented on code in PR #7542:
URL: https://github.com/apache/arrow-datafusion/pull/7542#discussion_r1324355105
##########
datafusion/physical-expr/src/physical_expr.rs:
##########
@@ -181,3 +181,17 @@ pub fn down_cast_any_ref(any: &dyn Any) -> &dyn Any {
any
}
}
+
+/// It is similar to contains method of vector.
+/// Finds whether `expr` is among `physical_exprs`.
+pub fn physical_exprs_contains(
+ physical_exprs: &[Arc<dyn PhysicalExpr>],
+ expr: &Arc<dyn PhysicalExpr>,
+) -> bool {
+ for physical_expr in physical_exprs {
Review Comment:
Can use `.any()` here
--
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]