throw new SemanticException ("UDF " + qualifiedName + " is not allowed"); if (!isNative && info != null && info.isDiscarded()) {
throw new SemanticException ("UDF " + qualifiedName + " is not allowed"); if (!isNative && info != null && info.isDiscarded()) {
private FunctionInfo getQualifiedFunctionInfo(String qualifiedName) throws SemanticException { FunctionInfo info = mFunctions.get(qualifiedName); if (info != null && info.isBlockedFunction()) { throw new SemanticException ("UDF " + qualifiedName + " is not allowed"); } if (!isNative && info != null && info.isDiscarded()) { // the persistent function is discarded. try reload mFunctions.remove(qualifiedName); return null; } // HIVE-6672: In HiveServer2 the JARs for this UDF may have been loaded by a different thread, // 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); } return info; }