rdblue commented on pull request #1077:
URL: https://github.com/apache/iceberg/pull/1077#issuecomment-636205153


   Looks like there are two problems. First, `findType` throws a 
`NullPointerException` if the type isn't found. I think that should check 
whether the name was found, like this:
   
   ```diff
      public Type findType(String name) {
        Preconditions.checkArgument(!name.isEmpty(), "Invalid column name: 
(empty)");
   -    return findType(lazyNameToId().get(name));
   +    Integer id = lazyNameToId().get(name);
   +    if (id != null) {
   +      return findType(id);
   +    }
   +    return null;
      }
   ```
   
   Second, if the file projection is null, it is still dereferenced. So we need 
to fix that as well:


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to