You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "grundprinzip (via GitHub)" <gi...@apache.org> on 2023/03/08 06:02:39 UTC
[GitHub] [spark] grundprinzip commented on a diff in pull request #40323: [SPARK-42705][CONNECT] Fix spark.sql to return values from the command
grundprinzip commented on code in PR #40323:
URL: https://github.com/apache/spark/pull/40323#discussion_r1129008040
##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -1508,8 +1508,10 @@ class SparkConnectPlanner(val session: SparkSession) {
maxRecordsPerBatch,
maxBatchSize,
timeZoneId)
- assert(batches.size == 1)
- batches.next()
+ assert(batches.hasNext)
Review Comment:
Sorry for the late reply but how is this code different to the existing one?
val bytes = batches.next()
bytes
Is the same as
batches.next()
The asserts in between don't count as they don't have side effects.
--
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-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org