apache / apache/parquet-java

Close input readers when ParquetRewriter setup fails

Open Beginner friendly
#3,667 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
3d 12h
Merged PRs (30d)
33

Description

### Describe the bug, including details regarding any error messages, version, and platform.

`ParquetRewriter.getFileReaders` opens each input reader into a local list. If opening a later input throws `IOException`, the exception is propagated without closing readers already opened for earlier inputs. Because construction fails, callers cannot close those readers, which leaks their input streams.

Expected behavior: readers opened before the failure are closed before the setup exception is propagated.

### Component(s)

Core

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at ParquetRewriter.getFileReaders and trace how input readers are opened and how setup IOExceptions are propagated. Verify that readers opened before a failure are closed before the exception escapes, then run the focused tests for ParquetRewriter or Core to confirm the setup-failure behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.