File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -473,14 +473,11 @@ object OptimizeIn extends Rule[LogicalPlan] {
473473object CNFNormalization extends Rule [LogicalPlan ] {
474474 def apply (plan : LogicalPlan ): LogicalPlan = plan transform {
475475 case q : LogicalPlan => q transformExpressionsUp {
476- case or @ Or (left, right) => (left, right) match {
477- // reverse Or with its And child to eliminate (And under Or) occurrence
478- case (And (innerLhs, innerRhs), rhs) =>
479- And (Or (innerLhs, rhs), Or (innerRhs, rhs))
480- case (lhs, And (innerLhs, innerRhs)) =>
481- And (Or (lhs, innerLhs), Or (lhs, innerRhs))
482- case _ => or
483- }
476+ // reverse Or with its And child to eliminate (And under Or) occurrence
477+ case Or (And (innerLhs, innerRhs), rhs) =>
478+ And (Or (innerLhs, rhs), Or (innerRhs, rhs))
479+ case Or (lhs, And (innerLhs, innerRhs)) =>
480+ And (Or (lhs, innerLhs), Or (lhs, innerRhs))
484481 }
485482 }
486483}
You can’t perform that action at this time.
0 commit comments