Skip to content

Commit

Permalink
lazy val
Browse files Browse the repository at this point in the history
  • Loading branch information
gengliangwang committed Jun 9, 2020
1 parent 2976a60 commit f951463
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ object PushCNFPredicateThroughJoin extends Rule[LogicalPlan] with PredicateHelpe
j
} else {
val pushDownCandidates = predicates.filter(_.deterministic)
val leftFilterConditions = pushDownCandidates.filter(_.references.subsetOf(left.outputSet))
val rightFilterConditions =
lazy val leftFilterConditions =
pushDownCandidates.filter(_.references.subsetOf(left.outputSet))
lazy val rightFilterConditions =
pushDownCandidates.filter(_.references.subsetOf(right.outputSet))

val newLeft =
lazy val newLeft =
leftFilterConditions.reduceLeftOption(And).map(Filter(_, left)).getOrElse(left)
val newRight =
lazy val newRight =
rightFilterConditions.reduceLeftOption(And).map(Filter(_, right)).getOrElse(right)

joinType match {
Expand Down

0 comments on commit f951463

Please sign in to comment.