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

    https://github.com/apache/spark/pull/22524#discussion_r219667461
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/limit.scala ---
    @@ -84,9 +84,10 @@ trait BaseLimitExec extends UnaryExecNode with 
CodegenSupport {
         s"""
            | if ($countTerm < $limit) {
            |   $countTerm += 1;
    +       |   if ($countTerm == $limit) {
    +       |     $stopEarly = true;
    +       |   }
            |   ${consume(ctx, input)}
    -       | } else {
    --- End diff --
    
    do we need to remove this? Isn't it safer to let it here?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to