You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/11/21 15:57:21 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #38744: [SPARK-41217][SQL] Add the error class `FAILED_FUNCTION_CALL`

MaxGekk commented on code in PR #38744:
URL: https://github.com/apache/spark/pull/38744#discussion_r1028220801


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -3393,4 +3393,15 @@ private[sql] object QueryCompilationErrors extends QueryErrorsBase {
         "unsupported" -> unsupported.toString,
         "class" -> unsupported.getClass.toString))
   }
+
+  def funcBuildError(funcName: String, cause: Exception): Throwable = {
+    cause.getCause match {
+      case st: SparkThrowable with Throwable => st

Review Comment:
   If some Spark's exception happens during preparation of a function call, we just propagate it to users as is otherwise (something we didn't catch) we wrap it by `AnalysisException(errorClass = FAILED_FUNCTION_CALL)`



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