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

    https://github.com/apache/drill/pull/795#discussion_r108050543
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/SchemaUtilites.java
 ---
    @@ -185,6 +186,35 @@ public static AbstractSchema 
resolveToMutableDrillSchema(final SchemaPlus defaul
       }
     
       /**
    +   * Given a schema in schema tree, once this schema is found resolve it 
into a mutable <i>AbstractDrillSchema</i>
    +   *  instance. A {@link UserException} is throws when:
    +   *   1. Schema is a root schema
    +   *   2. schema is not a mutable schema.
    +   * @param schema
    +   * @return
    +   */
    +  public static AbstractSchema toMutableDrillSchema(final SchemaPlus 
schema) {
    +    if (schema == null) {
    +      throwSchemaNotFoundException(schema, schema.getName());
    --- End diff --
    
    Err... If schema is null, then `schema.getName()` will throw an NPE...
    
    Why would the schema be null? Should this be:
    
    ```
    assert schema != null;
    ```



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