Skip to content

Commit

Permalink
More comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Aug 13, 2017
1 parent 413707d commit 0bb8c0e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ trait CodegenSupport extends SparkPlan {

// Under certain conditions, we can put the logic to consume the rows of this operator into
// another function. So we can prevent a generated function too long to be optimized by JIT.
// The conditions:
// 1. The parent uses all variables in output. we can't defer variable evaluation when consume
// in another function.
// 2. The output variables are not empty. If it's empty, we don't bother to do that.
// 3. We don't use row variable. The construction of row uses deferred variable evaluation. We
// can't do it.
val requireAllOutput = output.forall(parent.usedInputs.contains(_))
val consumeFunc =
if (row == null && outputVars.nonEmpty && requireAllOutput) {
Expand Down

0 comments on commit 0bb8c0e

Please sign in to comment.