Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-45050][SQL][CONNECT] Improve error message for UNKNOWN io.grpc…
….StatusRuntimeException ### What changes were proposed in this pull request? - Improve error message for UNKNOWN io.grpc.StatusRuntimeException Before: ``` [info] - handle unknown exception *** FAILED *** (15 milliseconds) [info] org.apache.spark.SparkException: [info] at org.apache.spark.sql.connect.client.GrpcExceptionConverter$.toThrowable(GrpcExceptionConverter.scala:110) [info] at org.apache.spark.sql.connect.client.GrpcExceptionConverter$.convert(GrpcExceptionConverter.scala:41) [info] at org.apache.spark.sql.connect.client.GrpcExceptionConverter$$anon$1.hasNext(GrpcExceptionConverter.scala:49) [info] at org.apache.spark.sql.connect.client.SparkResult.org$apache$spark$sql$connect$client$SparkResult$$processResponses(SparkResult.scala:83) [info] at org.apache.spark.sql.connect.client.SparkResult.length(SparkResult.scala:153) [info] at org.apache.spark.sql.connect.client.SparkResult.toArray(SparkResult.scala:183) [info] at org.apache.spark.sql.Dataset.$anonfun$collect$1(Dataset.scala:2910) [info] at org.apache.spark.sql.Dataset.withResult(Dataset.scala:3350) [info] at org.apache.spark.sql.Dataset.collect(Dataset.scala:2909) [info] at org.apache.spark.sql.ClientE2ETestSuite.$anonfun$new$19(ClientE2ETestSuite.scala:118) ``` After: ``` [info] - handle unknown exception *** FAILED *** (21 milliseconds) [info] org.apache.spark.SparkException: io.grpc.StatusRuntimeException: UNKNOWN [info] at org.apache.spark.sql.connect.client.GrpcExceptionConverter$.toThrowable(GrpcExceptionConverter.scala:110) [info] at org.apache.spark.sql.connect.client.GrpcExceptionConverter$.convert(GrpcExceptionConverter.scala:41) [info] at org.apache.spark.sql.connect.client.GrpcExceptionConverter$$anon$1.hasNext(GrpcExceptionConverter.scala:49) [info] at org.apache.spark.sql.connect.client.SparkResult.org$apache$spark$sql$connect$client$SparkResult$$processResponses(SparkResult.scala:83) [info] at org.apache.spark.sql.connect.client.SparkResult.length(SparkResult.scala:153) [info] at org.apache.spark.sql.connect.client.SparkResult.toArray(SparkResult.scala:183) [info] at org.apache.spark.sql.Dataset.$anonfun$collect$1(Dataset.scala:2910) [info] at org.apache.spark.sql.Dataset.withResult(Dataset.scala:3350) [info] at org.apache.spark.sql.Dataset.collect(Dataset.scala:2909) [info] at org.apache.spark.sql.ClientE2ETestSuite.$anonfun$new$19(ClientE2ETestSuite.scala:118) ``` ### Why are the changes needed? - Better readability of the exception message ### Does this PR introduce _any_ user-facing change? - No ### How was this patch tested? - build/sbt "connect-client-jvm/testOnly *ClientE2ETestSuite" ### Was this patch authored or co-authored using generative AI tooling? Closes #42771 from heyihong/SPARK-45050. Authored-by: Yihong He <yihong.he@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org> (cherry picked from commit e82805d) Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
- Loading branch information