Repository: hive Updated Branches: refs/heads/master 5776025c0 -> f1ac8a09d
HIVE-13903 : getFunctionInfo should register jars under a check (Reviewed by Amareshwari) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/f1ac8a09 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/f1ac8a09 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/f1ac8a09 Branch: refs/heads/master Commit: f1ac8a09d8fb2f3fad4e7ba05a4f71dc73f5e560 Parents: 5776025 Author: Rajat Khandelwal <pro...@apache.org> Authored: Tue Jun 7 10:15:25 2016 +0530 Committer: Amareshwari Sriramadasu <amareshw...@apache.org> Committed: Tue Jun 7 10:15:25 2016 +0530 ---------------------------------------------------------------------- ql/src/java/org/apache/hadoop/hive/ql/exec/Registry.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/f1ac8a09/ql/src/java/org/apache/hadoop/hive/ql/exec/Registry.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/Registry.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/Registry.java index 86df74d..a89db68 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/Registry.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/Registry.java @@ -556,7 +556,12 @@ public class Registry { // and the current thread may not be able to resolve the UDF. Test for this condition // and if necessary load the JARs in this thread. if (isNative && info != null && info.isPersistent()) { - return registerToSessionRegistry(qualifiedName, info); + try { + info.getFunctionClass(); + } catch (Exception e) { + return registerToSessionRegistry(qualifiedName, info); + } + return info; } if (info != null || !isNative) { return info; // We have the UDF, or we are in the session registry (or both).