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


##########
sql/core/src/main/scala/org/apache/spark/sql/scripting/SqlScriptingExecutionNode.scala:
##########
@@ -102,10 +122,11 @@ class SingleStatementExec(
 abstract class CompoundNestedStatementIteratorExec(collection: 
Seq[CompoundStatementExec])
   extends NonLeafStatementExec {
 
-  private var localIterator = collection.iterator
-  private var curr = if (localIterator.hasNext) Some(localIterator.next()) 
else None
+  protected var localIterator: Iterator[CompoundStatementExec] = 
collection.iterator
+  protected var curr: Option[CompoundStatementExec] =
+    if (localIterator.hasNext) Some(localIterator.next()) else None
 
-  private lazy val treeIterator: Iterator[CompoundStatementExec] =
+  protected lazy val treeIterator: Iterator[CompoundStatementExec] =

Review Comment:
   let's remove `treeIterator` implementation from 
`CompoundNestedStatementIteratorExec` for now, and let's then figure out 
offline if we need `CompoundNestedStatementIteratorExec` at all in the future



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to