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 2019/12/27 05:02:22 UTC
[GitHub] [spark] HeartSaVioR commented on a change in pull request #23921:
[SPARK-26560][SQL]:Repeat select on HiveUDF fails
HeartSaVioR commented on a change in pull request #23921: [SPARK-26560][SQL]:Repeat select on HiveUDF fails
URL: https://github.com/apache/spark/pull/23921#discussion_r361581937
##########
File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala
##########
@@ -66,10 +66,11 @@ private[sql] class HiveSessionCatalog(
name: String,
clazz: Class[_],
input: Seq[Expression]): Expression = {
-
- Try(super.makeFunctionExpression(name, clazz, input)).getOrElse {
- var udfExpr: Option[Expression] = None
- try {
+ val originalClassLoader = Thread.currentThread().getContextClassLoader()
Review comment:
It doesn't need to modify original code but just switch context classloader. Then, use `Utils.withContextClassLoader` and just pass original code into fn.
----------------------------------------------------------------
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.
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