Skip to content

Commit

Permalink
shouldStop is called outside consume().
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Aug 13, 2017
1 parent 05274e7 commit e0e7a6e
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,7 @@ trait CodegenSupport extends SparkPlan {
| }
""".stripMargin)

if (isShouldStopRequired) {
// Because the processing logic is enclosed in a function, `shouldStop` call in the function
// don't be affect outside loop, we need to check it and stop the loop.
s"""
| $doConsumeFuncName($callingParams);
| if (shouldStop()) return;
""".stripMargin
} else {
s"$doConsumeFuncName($callingParams);"
}
s"$doConsumeFuncName($callingParams);"
}

/**
Expand Down

0 comments on commit e0e7a6e

Please sign in to comment.