apache / apache/arrow-rs

Parquet: Allow ParquetRecordBatchReader expose the row plans to read

Open
#8,197 3 comments 0 reactions 0 assignees View on GitHub
enhancement parquet
Dominant language
Rust
Stars
3.6k
Forks
1.3k
Avg merge
2d 18h
Merged PRs (30d)
169

Description

**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**

Currently, a ParquetRecordBatchReader would has a plan for read. It's maximum read row count is a fixed-sized number, can we try to expose this?

**Describe the solution you'd like**

Add a `row_count` interface for it, would be like ( the impl is incomplete )

```rust
pub(crate) fn remaining_row_count(&self) -> usize {
match &self.selection {
None => 0,
Some(s) => {
let mut value = 0;
for v in s {
if !v.skip {
value += v.row_count;
}
}
value
}
}
}
```

**Describe alternatives you've considered**

Any row-count like interface is ok

**Additional context**

No here

Contributor guide

Open the contributing guide

Research direction

Locate the ParquetRecordBatchReader implementation and inspect how its current read plan and selection are represented. Determine how a row-count interface should expose the remaining planned rows, then verify that the reader reports the expected count for selected and skipped row groups.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data-engineering
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.