Github user yjshen commented on a diff in the pull request:
https://github.com/apache/spark/pull/8200#discussion_r48133669
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
---
@@ -489,13 +511,13 @@ object BooleanSimplification extends
Rule[LogicalPlan] with PredicateHelper {
case (l, Or(r, l1)) if (Not(l) == l1) => And(l, r)
case (Or(l, l1), r) if (l1 == Not(r)) => And(l, r)
case (Or(l1, l), r) if (l1 == Not(r)) => And(l, r)
- // (a || b) && (a || c) => a || (b && c)
+ // (a || b) && (a || b || c) => a || b
--- End diff --
`(a || b) && (a || c) => a || (b && c)` is just a transformation instead
of optimization, it is only the case when we could eliminate one side like: `(a
|| b) && (a || b || c) => a || b`. Besides, the original transformation is
opposite to CNF Normalize.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]