caneGuy 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_r244251370
##########
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:
I agree. Original implementation is just set 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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]