You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by cloud-fan <gi...@git.apache.org> on 2018/10/13 06:24:58 UTC
[GitHub] spark pull request #22711: [SPARK-25714][SQL][followup] improve the comment ...
Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/22711#discussion_r224951190
--- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala ---
@@ -276,31 +276,37 @@ object BooleanSimplification extends Rule[LogicalPlan] with PredicateHelper {
case a And b if a.semanticEquals(b) => a
case a Or b if a.semanticEquals(b) => a
- // The following optimization is applicable only when the operands are not nullable,
+ // The following optimizations are applicable only when the operands are not nullable,
// since the three-value logic of AND and OR are different in NULL handling.
// See the chart:
// +---------+---------+---------+---------+
- // | p | q | p OR q | p AND q |
+ // | operand | operand | OR | AND |
--- End diff --
AND and OR is commutative, so we can reduce the entries in this table
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org