apache / apache/parquet-java

No need to read full RowGroup when using RowRanges

Open
#3,231 1 comment 0 reactions 0 assignees View on GitHub
Type: enhancement
Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
3d 12h
Merged PRs (30d)
33

Description

### Describe the enhancement requested

I'm using ParquetFileReader and would like to read the few first line of a parquet file to show a preview to the user.
I'm doing this :
PageReadStore rowGroup = reader.readFilteredRowGroup(0, RowRanges.createSingle(10));
and then :
ColumnReadStore colReadStore = new ColumnReadStoreImpl(rowGroup,
new GroupRecordConverter(schema).getRootConverter(),
schemaLecture, ...);
etc.

The problem is when calling readFilteredRowGroup(), it reads the full row group in memory, which in my case is slow because the parquet file is on a network drive and has quite big row group. On top of that, it consumes RAM for nothing.

Is this an issue or could it be improved ?

Thanks in advance.
Olivier

### Component(s)

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at ParquetFileReader.readFilteredRowGroup() and trace how RowRanges.createSingle(10) is handled when loading a row group. Determine where the full row group is read and how range filtering could limit network reads and memory use; done means the requested rows can be read without loading the full row group.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.