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/04/25 09:29:27 UTC
[GitHub] [spark] LuciferYang commented on a diff in pull request #36336: [SPARK-38692][SQL] Use error classes in the compilation errors of function args
LuciferYang commented on code in PR #36336:
URL: https://github.com/apache/spark/pull/36336#discussion_r857432254
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala:
##########
@@ -153,6 +153,9 @@ object FunctionRegistryBase {
} catch {
// the exception is an invocation exception. To get a meaningful message, we need the
// cause.
+ case e: Exception if e.getCause.isInstanceOf[AnalysisException] =>
Review Comment:
does this eqs
```scala
case e: Exception =>
e.getCause match {
case ae: AnalysisException if ae.errorClass.isDefined => throw ae;
case other => throw new AnalysisException(other.getMessage)
}
```
--
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