ueshin commented on code in PR #40782:
URL: https://github.com/apache/spark/pull/40782#discussion_r1174158327


##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/SparkResult.scala:
##########
@@ -80,7 +80,10 @@ private[sql] class SparkResult[T](
           }
           while (reader.loadNextBatch()) {
             val rowCount = root.getRowCount
-            assert(root.getRowCount == response.getArrowBatch.getRowCount) // 
HUH!
+            assert(
+              response.getIsLocalBuilt ||
+                root.getRowCount == response.getArrowBatch.getRowCount

Review Comment:
   I guess adding the row count as optional to `LocalRelation` message is more 
useful.
   The server can check if the expected number of rows are provided, and we can 
reuse it here to set the row count.



-- 
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