Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style fixes
  • Loading branch information
sameeragarwal committed Mar 16, 2016
commit df96e9752a8a68acbb983c06883a88af48068c90
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ object InferFiltersFromConstraints extends Rule[LogicalPlan] with PredicateHelpe
filter
}

case join@Join(left, right, joinType, conditionOpt) =>
case join @ Join(left, right, joinType, conditionOpt) =>
val additionalConstraints = join.constraints.filter { c =>
// Only consider constraints that can be pushed down to either the left or the right child
c.references.subsetOf(left.outputSet) || c.references.subsetOf(right.outputSet)} --
Expand All @@ -642,7 +642,7 @@ object InferFiltersFromConstraints extends Rule[LogicalPlan] with PredicateHelpe
val newFilters = additionalConstraints -- splitConjunctivePredicates(condition)
if (newFilters.nonEmpty) Option(And(newFilters.reduce(And), condition)) else None
case None =>
if (additionalConstraints.nonEmpty) Option(additionalConstraints.reduce(And)) else None
additionalConstraints.reduceOption(And)
}
if (newConditionOpt.isDefined) Join(left, right, joinType, newConditionOpt) else join
}
Expand Down