apache / apache/parquet-java

Could we provide a potentially larger InternalParquetRecordWriter.getDataSize

Open
#3,032 1 comment 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

The following code currently has getDataSize as an estimated value. The Iceberg rolling file write operation relies on this method, which may result in writing files that are much smaller than expected.
```JAVA
/**
* @return the total size of data written to the file and buffered in memory
*/
public long getDataSize() {
return lastRowGroupEndPos + columnStore.getBufferedSize();
}
```

Could we provide a potentially larger getDataSize? I can't think of any downsides at the moment.

### Component(s)

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate InternalParquetRecordWriter.getDataSize and trace how Iceberg's rolling file write operation uses its value. Compare the reported size with actual written and buffered data, then define and test a larger, safe size estimate that prevents unexpectedly small files.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.