You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by jinxing64 <gi...@git.apache.org> on 2018/01/11 10:07:23 UTC
[GitHub] spark pull request #20069: [SPARK-22895] [SQL] Push down the deterministic p...
Github user jinxing64 commented on a diff in the pull request:
https://github.com/apache/spark/pull/20069#discussion_r160910495
--- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala ---
@@ -851,7 +851,7 @@ object PushDownPredicate extends Rule[LogicalPlan] with PredicateHelper {
case filter @ Filter(condition, union: Union) =>
// Union could change the rows, so non-deterministic predicate can't be pushed down
- val (pushDown, stayUp) = splitConjunctivePredicates(condition).span(_.deterministic)
+ val (pushDown, stayUp) = splitConjunctivePredicates(condition).partition(_.deterministic)
--- End diff --
@viirya
IIUC, with `span`, the deterministic predicates after the first non-deterministic will not be pushed down, but with `partition`, all deterministic predicates will be pushed down.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org