InternalParquetRecordReader.close() currently throws a NullPointerException if initialize() didn't succeed and hence the "reader" remains null.
This NPE happens with client usage idioms like this:
AvroParquetReader reader = ...
try {
// read some parquet data
} finally {
if (reader != null) { reader.close(); }
}
I believe close() should read as follows:
public void close() throws IOException {
if (reader != null) {
reader.close();
}
}
Thoughts?
Reporter: Wolfgang Hoschek / @whoschek
Assignee: Wolfgang Hoschek / @whoschek
Note: This issue was originally created as PARQUET-145. Please see the migration documentation for further details.