ivoson commented on code in PR #40610: URL: https://github.com/apache/spark/pull/40610#discussion_r1216559940
########## connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/SparkResult.scala: ########## @@ -46,7 +46,14 @@ private[sql] class SparkResult[T]( private[this] var numRecords: Int = 0 private[this] var structType: StructType = _ private[this] var boundEncoder: ExpressionEncoder[T] = _ - private[this] val batches = mutable.Buffer.empty[ColumnarBatch] + private[this] var nextBatchIndex: Int = 0 + private[this] val idxToBatches = mutable.Map.empty[Int, ColumnarBatch] + + // Exposed for UT. + private[sql] def existingBatches(): Seq[ColumnarBatch] = { Review Comment: thanks, done. -- 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