xi-db opened a new pull request, #52953:
URL: https://github.com/apache/spark/pull/52953

   ### What changes were proposed in this pull request?
   
   (This PR is a backporting PR containing 
https://github.com/apache/spark/pull/52496 and the test fix 
https://github.com/apache/spark/pull/52941.)
   
   In the previous PR https://github.com/apache/spark/pull/52271 of Spark 
Connect ArrowBatch Result Chunking, both Server-side and PySpark client changes 
were implemented.
   
   In this PR, the corresponding Scala client changes are implemented, so large 
Arrow rows are now supported on the Scala client as well.
   
   To reproduce the existing issue we are solving here, run this code on Spark 
Connect Scala client:
   
   ```
   val res = spark.sql("select repeat('a', 1024*1024*300)").collect()
   println(res(0).getString(0).length)
   ```
   
   It fails with `RESOURCE_EXHAUSTED` error with message `gRPC message exceeds 
maximum size 134217728: 314573320`, because the server is trying to send an 
ExecutePlanResponse of ~300MB to the client.
   
   With the improvement introduced by the PR, the above code runs successfully 
and prints the expected result.
   
   ### Why are the changes needed?
   
   It improves Spark Connect stability when returning large rows.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   New tests.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No.


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