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 2018/12/27 14:30:49 UTC

[GitHub] srowen commented on a change in pull request #21790: [SPARK-24544][SQL] Print actual failure cause when look up function failed

srowen commented on a change in pull request #21790: [SPARK-24544][SQL] Print actual failure cause when look up function failed
URL: https://github.com/apache/spark/pull/21790#discussion_r244163189
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/NoSuchItemException.scala
 ##########
 @@ -40,10 +41,12 @@ class NoSuchPartitionException(
 class NoSuchPermanentFunctionException(db: String, func: String)
   extends AnalysisException(s"Function '$func' not found in database '$db'")
 
-class NoSuchFunctionException(db: String, func: String)
+class NoSuchFunctionException(db: String, func: String, cause: Option[Throwable] = None)
   extends AnalysisException(
-    s"Undefined function: '$func'. This function is neither a registered temporary function nor " +
-    s"a permanent function registered in the database '$db'.")
+     s"Undefined function: '$func'. This function is neither a registered temporary function nor " +
+      s"a permanent function registered in the database '$db'." +
+      s"${cause.map(th => s"Exception thrown during look up:" +
 
 Review comment:
   This is too complex for string interpolation. But why not just set the exception's cause?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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