This is an automated email from the ASF dual-hosted git repository.

linxinyuan pushed a commit to branch xinyuan-loop-feb
in repository https://gitbox.apache.org/repos/asf/texera.git


The following commit(s) were added to refs/heads/xinyuan-loop-feb by this push:
     new 24da3e38ac update
24da3e38ac is described below

commit 24da3e38ac1498a1f4cc1da0342d2d436cfdcc28
Author: Xinyuan Lin <[email protected]>
AuthorDate: Wed Feb 11 00:27:38 2026 -0800

    update
---
 .../texera/amber/engine/architecture/scheduling/Schedule.scala      | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/amber/src/main/scala/org/apache/texera/amber/engine/architecture/scheduling/Schedule.scala
 
b/amber/src/main/scala/org/apache/texera/amber/engine/architecture/scheduling/Schedule.scala
index d0ba526809..c4b9c34c6c 100644
--- 
a/amber/src/main/scala/org/apache/texera/amber/engine/architecture/scheduling/Schedule.scala
+++ 
b/amber/src/main/scala/org/apache/texera/amber/engine/architecture/scheduling/Schedule.scala
@@ -22,6 +22,7 @@ package org.apache.texera.amber.engine.architecture.scheduling
 case class Schedule(private val levelSets: Map[Int, Set[Region]]) extends 
Iterator[Set[Region]] {
   private var currentLevel = levelSets.keys.minOption.getOrElse(0)
   private var loopStartLevel = currentLevel
+  private var i = 0
 
   def getRegions: List[Region] = levelSets.values.flatten.toList
 
@@ -36,7 +37,10 @@ case class Schedule(private val levelSets: Map[Int, 
Set[Region]]) extends Iterat
 
   def loopNext(): Set[Region] = {
     val regions = levelSets(currentLevel)
-    
if(regions.exists(_.getOperators.exists(_.id.logicalOpId.id.startsWith("LoopEnd-operator-"))))
 currentLevel = loopStartLevel
+    
if(regions.exists(_.getOperators.exists(_.id.logicalOpId.id.startsWith("LoopEnd-operator-")))
 && i < 5) {
+      currentLevel = loopStartLevel
+      i+=1
+    }
     currentLevel += 1
     regions
   }

Reply via email to