cloud-fan commented on a change in pull request #31318:
URL: https://github.com/apache/spark/pull/31318#discussion_r578241419



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
##########
@@ -366,6 +363,16 @@ object BooleanSimplification extends Rule[LogicalPlan] 
with PredicateHelper {
             // ((c || ...) && (d || ...)) || a || b
             (common :+ And(ldiff.reduce(Or), rdiff.reduce(Or))).reduce(Or)
           }
+        } else {
+          // No common factors from disjunctive predicates, reduce common 
factor from conjunction
+          val all = splitConjunctivePredicates(left) ++ 
splitConjunctivePredicates(right)

Review comment:
       so the improvement is to handle the mix of `&` and `|` ?




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to