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

   ### What changes were proposed in this pull request?
   
   This PR makes Spark Connect's fallback gRPC error description non-empty.
   
   When a throwable has a non-empty message, the message remains abbreviated to 
2048 characters. Otherwise, the throwable's fully qualified class name is used.
   
   A regression test covers a bare `InterruptedException`, which has no message.
   
   ### Why are the changes needed?
   
   Fatal throwables such as `InterruptedException` reach the generic fallback 
path. `Utils.abbreviate(null, 2048)` returns `null`, causing Spark Connect to 
emit an `UNKNOWN` status without a useful description.
   
   Clients consequently receive an opaque error. This change preserves the 
status code while providing the throwable class as useful diagnostic context.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. For an already-failing request whose fatal throwable has no message, 
the client now receives the throwable class name instead of an empty error 
description. Successful requests and other error-conversion paths are unchanged.
   
   ### How was this patch tested?
   
   Added a regression test to `FetchErrorDetailsHandlerSuite` verifying that a 
bare `InterruptedException` produces an `UNKNOWN` status with 
`java.lang.InterruptedException` as its description.
   
   The focused suite could not run locally because the required SBT 
dependencies were unavailable in the development environment. Static diff 
checks passed; the regression will also run in CI.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Co-authord with Codex.


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