alamb commented on code in PR #13128:
URL: https://github.com/apache/datafusion/pull/13128#discussion_r1826063930
##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -1681,9 +1679,15 @@ impl<'a, S: SimplifyInfo> TreeNodeRewriter for
Simplifier<'a, S> {
}
}
-fn has_common_conjunction(lhs: &Expr, rhs: &Expr) -> bool {
+fn has_common_conjunction(lhs: &Expr, rhs: &Expr) -> Result<bool,
DataFusionError> {
let lhs: HashSet<&Expr> = iter_conjunction(lhs).collect();
- iter_conjunction(rhs).any(|e| lhs.contains(&e))
+ iter_conjunction(rhs).try_fold(false, |acc, e| {
Review Comment:
I changed the signature in https://github.com/apache/datafusion/pull/13206
which caused a logical conflict in this PR (failed to compile) and then I
updated this PR to use the new signature
As @eejbyfeldt predicated, the PR became much cleaner
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]