GitHub user paul-rogers opened a pull request:

    https://github.com/apache/drill/pull/777

    DRILL-5330: NPE in FunctionImplementationRegistry

    Fixes:
    
    * DRILL-5330: NPE in
    FunctionImplementationRegistry.functionReplacement()
    * DRILL-5331:
    NPE in FunctionImplementationRegistry.findDrillFunction() if dynamic
    UDFs disabled
    
    For DRILL-5331, we leverage an existing session option to determine if
    DUDFs are enabled. If not, we skip the DUDF registry check.
    
    For DRILL-5330, we use an existing option validator rather than
    accessing the raw option directly.
    
    Then, both options cached on setup rather than repeatedly resolved in
    each function lookup.
    
    Also includes a bit of code cleanup in the class in question.
    
    The result is that the code now works when used in a sub-operator unit
    test.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paul-rogers/drill DRILL-5330

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/777.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #777
    
----
commit 8d2d9093dd26582fa7b13fe6fb57428f9a90d170
Author: Paul Rogers <prog...@maprtech.com>
Date:   2017-03-10T19:55:13Z

    DRILL-5330: NPE in FunctionImplementationRegistry
    
    Fixes:
    
    * DRILL-5330: NPE in
    FunctionImplementationRegistry.functionReplacement()
    * DRILL-5331:
    NPE in FunctionImplementationRegistry.findDrillFunction() if dynamic
    UDFs disabled
    
    For DRILL-5331, we leverage an existing session option to determine if
    DUDFs are enabled. If not, we skip the DUDF registry check.
    
    For DRILL-5330, we use an existing option validator rather than
    accessing the raw option directly.
    
    Then, both options cached on setup rather than repeatedly resolved in
    each function lookup.
    
    Also includes a bit of code cleanup in the class in question.
    
    The result is that the code now works when used in a sub-operator unit
    test.

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to