eejbyfeldt commented on code in PR #13128:
URL: https://github.com/apache/datafusion/pull/13128#discussion_r1822606751
##########
datafusion/sqllogictest/test_files/explain.slt:
##########
@@ -411,3 +411,40 @@ logical_plan
physical_plan
01)ProjectionExec: expr=[{c0:1,c1:2.3,c2:abc} as
struct(Int64(1),Float64(2.3),Utf8("abc"))]
02)--PlaceholderRowExec
+
+
+
+
+query TT
Review Comment:
Any reason for not adding these as unit tests in the `expr_simplifier`
module instead?
They feel quite output place in file called `explain.slt`.
##########
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:
> Maybe we can consider changing the return type of `Expr::is_volatile()` in
a follow-up PR.
I think this PR would be much cleaner if we fixed the signature of that
first. But I guess the important thing is that we do fix it before it spreads
keeps spreading.
--
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]