Github user juliuszsompolski commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19324#discussion_r141033249
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala
 ---
    @@ -197,11 +197,14 @@ trait CodegenSupport extends SparkPlan {
        *
        * This should be override by subclass to support codegen.
        *
    -   * For example, Filter will generate the code like this:
    +   * Note: The operator should not assume the existence of an outer 
processing loop,
    +   *       which it can jump from with "continue;"!
        *
    +   * For example, filter could generate this:
        *   # code to evaluate the predicate expression, result is isNull1 and 
value2
    -   *   if (isNull1 || !value2) continue;
    -   *   # call consume(), which will call parent.doConsume()
    +   *   if (!isNull1 && value2) {
    --- End diff --
    
    in reality the filter code generates a `do { } while(false)` with 
`continue` inside to jump out, just like it did before. There's appropriate 
comment to it there.
    I didn't want to complicate this example here, so changing the "will 
generate" to "could generate" is intentional to kind of show that it could, but 
not necessarily will :-)


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to