Github user aertoria commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/292#discussion_r170387933
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/expression/function/UDFExpression.java
 ---
    @@ -198,18 +199,26 @@ public static DynamicClassLoader getClassLoader(final 
PName tenantId, final Stri
                 }
                 return cl;
             } else {
    -            cl = pathSpecificCls.get(jarPath);
    -            if (cl == null) {
    -                Configuration conf = HBaseConfiguration.create(config);
    -                conf.set(DYNAMIC_JARS_DIR_KEY, parent);
    -                cl = new DynamicClassLoader(conf, 
UDFExpression.class.getClassLoader());
    -            }
    -            // Cache class loader as a weak value, will be GC'ed when no 
reference left
    -            DynamicClassLoader prev = pathSpecificCls.putIfAbsent(jarPath, 
cl);
    -            if (prev != null) {
    -                cl = prev;
    +            String rawPath = new 
Path(config.get(DYNAMIC_JARS_DIR_KEY)).toUri().getRawPath();
    +            // jarPath is provided as an HDFS URI without scheme and 
authority, but the jar is inside the configured hbase.dynamic.jars.dir
    +            if(rawPath.equals(parent)) {
    --- End diff --
    
    This if block seems will never be reachable. See line 188.  Aren't these 
two condition equivalent?


---

Reply via email to