reader = new DataFileReader(new ForwardOnlySeekableInputStream(in), datumReader);
byte[] writerSchemaBytes = reader.getMeta(DataFileConstants.SCHEMA);
Preconditions.checkNotNull(writerSchemaBytes);
ByteArrayKey writerSchemaKey = new ByteArrayKey(writerSchemaBytes);
ResolvingDecoder resolver = resolverCache.get(writerSchemaKey); // cache for performance
if (resolver == null) {
resolver = createResolver(datumReader.getSchema(), datumReader.getExpected());
resolverCache.put(writerSchemaKey, resolver);
datumReader.setResolver(resolver);
}