davidm-db commented on code in PR #47756:
URL: https://github.com/apache/spark/pull/47756#discussion_r1738859428


##########
sql/core/src/test/scala/org/apache/spark/sql/scripting/SqlScriptingExecutionNodeSuite.scala:
##########
@@ -72,11 +72,39 @@ class SqlScriptingExecutionNodeSuite extends SparkFunSuite 
with SharedSparkSessi
     }
   }
 
+  case class TestRepeatCondition(
+    condVal: Boolean, reps: Int, description: String)
+    extends SingleStatementExec(
+      parsedPlan = DummyLogicalPlan(),
+      Origin(startIndex = Some(0), stopIndex = Some(description.length)),
+      isInternal = false)
+
+  case class TestRepeat(
+    condition: TestRepeatCondition,
+    body: CompoundBodyExec)
+    extends RepeatStatementExec(condition, body, spark) {
+
+    private var callCount: Int = 0
+
+    override def evaluateBooleanCondition(

Review Comment:
   same here, it's the same as in While loop - let's create one function/lambda 
outside of the classes and use it here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to