Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/777#discussion_r105534393
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/FunctionImplementationRegistry.java
 ---
    @@ -160,7 +168,7 @@ public DrillFuncHolder 
findDrillFunction(FunctionResolver functionResolver, Func
         FunctionResolver exactResolver = 
FunctionResolverFactory.getExactResolver(functionCall);
         DrillFuncHolder holder = exactResolver.getBestMatch(functions, 
functionCall);
     
    -    if (holder == null) {
    +    if (holder == null && useDynamicUdfs) {
    --- End diff --
    
    1. When dynamic udfs are enabled, we first try to find matching function 
using exact function resolver `exactResolver.getBestMatch` and if match if not 
found check if remote and local function registries are in sync and then try to 
find matching function using provided function resolver 
`functionResolver.getBestMatch`. 
    So when dynamic udfs are disabled, we should not try to find matching 
function  using exact function resolver, we need to use provided one and skip 
function registry sync check,
    
    2. Regarding new bootstap option, since we already have system / session 
option `ExecConstants.USE_DYNAMIC_UDFS`, I suggest we use it during this check, 
first we won't have two similar options, second if we re-write method as 
suggested above (point 1), users who disabled dynamic udfs using system / 
session option will have performance benefit since we won't double-check 
function existence. Probably we should have done this when 
`ExecConstants.USE_DYNAMIC_UDFS` was introduced in first place.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to