You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "hvanhovell (via GitHub)" <gi...@apache.org> on 2023/08/15 23:36:54 UTC

[GitHub] [spark] hvanhovell commented on a diff in pull request #42500: [SPARK-44816][CONNECT] Improve error message when UDF class is not found

hvanhovell commented on code in PR #42500:
URL: https://github.com/apache/spark/pull/42500#discussion_r1295240142


##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -1532,6 +1532,11 @@ class SparkConnectPlanner(val sessionHolder: SessionHolder) extends Logging {
               s"Failed to load class correctly due to $nsm. " +
                 "Make sure the artifact where the class is defined is installed by calling" +
                 " session.addArtifact.")
+          case cnf: ClassNotFoundException =>

Review Comment:
   This is great!
   
   One thing to think about: If there is no serialization proxy involved it should be relatively easy to figure out which class to add. However if a proxy involved you'll get a ClassCastException that is very cryptic. See 
    https://issues.apache.org/jira/browse/SPARK-36917. We could also try to make that a bit more actionable.
   
   
   
   



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org