@@ -383,15 +383,15 @@ object BooleanSimplification extends Rule[LogicalPlan] with PredicateHelper {
383383 case (Literal (false , BooleanType ), r) => r
384384 // l || false => l
385385 case (l, Literal (false , BooleanType )) => l
386- // a || b = a
386+ // a || b => a
387387 case (l, r) if l fastEquals r => l
388388 // (a && b) || (a && c) => a && (b || c)
389389 case _ =>
390- // 1. Split left and right to get the conjunctive predicates,
391- // i.e. lhsSet = (a, b), rhsSet = (a, c)
392- // 2. Find the common predict between lhsSet and rhsSet, i.e. common = (a)
393- // 3. Remove common predict from lhsSet and rhsSet, i.e. ldiff = (b), rdiff = (c)
394- // 4. Apply the formula, get the optimized predicate: common && (ldiff || rdiff)
390+ // 1. Split left and right to get the conjunctive predicates,
391+ // i.e. lhsSet = (a, b), rhsSet = (a, c)
392+ // 2. Find the common predict between lhsSet and rhsSet, i.e. common = (a)
393+ // 3. Remove common predict from lhsSet and rhsSet, i.e. ldiff = (b), rdiff = (c)
394+ // 4. Apply the formula, get the optimized predicate: common && (ldiff || rdiff)
395395 val lhsSet = splitConjunctivePredicates(left).toSet
396396 val rhsSet = splitConjunctivePredicates(right).toSet
397397 val common = lhsSet.intersect(rhsSet)
0 commit comments