apache / apache/parquet-java

appendRowGroup will loose pageIndex

Open
#2,808 6 comments 0 reactions 0 assignees View on GitHub
Component: Java Component: Parquet Priority: Major Type: task
Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
3d 12h
Merged PRs (30d)
33

Description

Currently, 
org.apache.parquet.hadoop.ParquetFileWriter#appendFile(org.apache.parquet.io.InputFile) uses appendRowGroup method to concate parquet row group. However, appendRowGroup method **looses** column index.
```java

// code placeholder
  public void appendRowGroup(SeekableInputStream from, BlockMetaData rowGroup,
                             boolean dropColumns) throws IOException {
....
    // TODO: column/offset indexes are not copied
      // (it would require seeking to the end of the file for each row groups)
      currentColumnIndexes.add(null);
      currentOffsetIndexes.add(null);
}
```
 

 

Look forward to functionality that support append with page index.

 

**Reporter**: [GANHONGNAN](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=NathanKan)

**Note**: *This issue was originally created as [PARQUET-2340](https://issues.apache.org/jira/browse/PARQUET-2340). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java at appendFile(InputFile) and appendRowGroup. Trace how row-group column and offset indexes are represented and why the current method adds null entries. Review the surrounding writer logic and existing tests, then define completion as appended row groups retaining their page indexes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Feature
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.