Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.6.0
-
None
Description
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?