chaoqin-li1123 commented on code in PR #45977: URL: https://github.com/apache/spark/pull/45977#discussion_r1563131182
########## sql/core/src/main/scala/org/apache/spark/sql/execution/python/PythonStreamingSourceRunner.scala: ########## @@ -164,7 +175,20 @@ class PythonStreamingSourceRunner( val pickledPartition: Array[Byte] = PythonWorkerUtils.readBytes(dataIn) pickledPartitions.append(pickledPartition) } - pickledPartitions.toArray + val prefetchedRecordsStatus = dataIn.readInt() + val iter: Option[Iterator[InternalRow]] = + if (prefetchedRecordsStatus == NON_EMPTY_PYARROW_RECORD_BATCHES) { Review Comment: Nice catch! Changed to pattern match. -- 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