Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/795#discussion_r108051728
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/SchemaTreeProvider.java
 ---
    @@ -48,7 +55,8 @@
       public SchemaTreeProvider(final DrillbitContext dContext) {
         this.dContext = dContext;
         schemaTreesToClose = Lists.newArrayList();
    -    isImpersonationEnabled = 
dContext.getConfig().getBoolean(ExecConstants.IMPERSONATION_ENABLED);
    +    final DrillConfig config = dContext.getConfig();
    +    isImpersonationEnabled = config == null? false : 
config.getBoolean(ExecConstants.IMPERSONATION_ENABLED);
    --- End diff --
    
    Under what conditions will the config be null? Actually, should never be; 
we depend on config everywhere. So, just get the boolean and let the code get 
an NPE if someone makes a mistake and omits the (required) config.


---
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