Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/418#discussion_r11936429
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
---
@@ -37,10 +38,20 @@ trait Predicate extends Expression {
}
trait PredicateHelper {
- def splitConjunctivePredicates(condition: Expression): Seq[Expression] =
condition match {
- case And(cond1, cond2) => splitConjunctivePredicates(cond1) ++
splitConjunctivePredicates(cond2)
- case other => other :: Nil
+ protected def splitConjunctivePredicates(condition: Expression):
Seq[Expression] = {
+ condition match {
+ case And(cond1, cond2) =>
+ splitConjunctivePredicates(cond1) ++
splitConjunctivePredicates(cond2)
+ case other => other :: Nil
+ }
}
+
+ private def combineConjunctivePredicates(predicates: Seq[Expression]) =
+ predicates.reduceLeft(And)
+
+ /** Returns true if `expr` can be evaluated using only the output of
`plan`. */
--- End diff --
actually would be great to explain this slightly more, e.g. by giving an
example
---
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.
---