Skip to content

Commit 24e9373

Browse files
committed
GH-3207: ParquetFileReader should allow closing resources except for file input stream
1 parent 32a484a commit 24e9373

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,8 +1743,12 @@ public OffsetIndex readOffsetIndex(ColumnChunkMetaData column) throws IOExceptio
17431743

17441744
@Override
17451745
public void close() throws IOException {
1746+
close(true);
1747+
}
1748+
1749+
public void close(boolean closeFileInputStream) throws IOException {
17461750
try {
1747-
if (f != null) {
1751+
if (closeFileInputStream && f != null) {
17481752
f.close();
17491753
}
17501754
} finally {

0 commit comments

Comments
 (0)