Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
bersprockets committed Jan 22, 2019
1 parent 367b6e8 commit 5f27005
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ trait CodegenSupport extends SparkPlan {
* Note that `outputVars` and `row` can't both be null.
*/
final def consume(ctx: CodegenContext, outputVars: Seq[ExprCode], row: String = null): String = {
val inputVars = {
val inputVarsCandidate =
if (outputVars != null) {
assert(outputVars.length == output.length)
// outputVars will be used to generate the code for UnsafeRow, so we should copy them
Expand All @@ -156,7 +156,8 @@ trait CodegenSupport extends SparkPlan {
BoundReference(i, attr.dataType, attr.nullable).genCode(ctx)
}
}
} match {

val inputVars = inputVarsCandidate match {
case stream: Stream[ExprCode] => stream.force
case other => other
}
Expand Down

0 comments on commit 5f27005

Please sign in to comment.