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

    https://github.com/apache/spark/pull/21220#discussion_r185972962
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MicroBatchExecution.scala
 ---
    @@ -128,40 +130,49 @@ class MicroBatchExecution(
        * Repeatedly attempts to run batches as data arrives.
        */
       protected def runActivatedStream(sparkSessionForStream: SparkSession): 
Unit = {
    -    triggerExecutor.execute(() => {
    -      startTrigger()
     
    +    triggerExecutor.execute(() => {
           if (isActive) {
    +        var currentBatchIsRunnable = false // Whether the current batch is 
runnable / has been run
    +        var currentBatchHadNewData = false // Whether the current batch 
had new data
    +
             reportTimeTaken("triggerExecution") {
    +          startTrigger()
    --- End diff --
    
    correct. fixed.


---

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

Reply via email to