ueshin opened a new pull request, #39957:
URL: https://github.com/apache/spark/pull/39957

   ### What changes were proposed in this pull request?
   
   Adds details to non-fatal errors to raise a proper exception in the Python 
client, which makes `df.sample` raise `IllegalArgumentException` as same as 
PySpark, except for the timing that is delayed to call actions.
   
   ### Why are the changes needed?
   
   Currently `SparkConnectService` does not add details for `NonFatal` 
exceptions to the `PRCStatus`, so the Python client can't detect the exception 
properly and raises `SparkConnectGrpcException` instead.
   
   It also should have the details for the Python client.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Users will see a proper exception when they call `df.sample` with illegal 
arguments, but in a different timing.
   
   ### How was this patch tested?
   
   Enabled `DataFrameParityTests.test_sample`.


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