apache / apache/arrow

[C++][ORC] Add OrcFileFragment with stripe-level subsetting

Open
#49,288 1 comment 0 reactions 1 assignee Claimed by @ShreyeshArangath View on GitHub
Component: C++ Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the enhancement requested

### Summary
The ORC dataset integration currently lacks stripe-level subsetting support. When scanning ORC files through the Dataset API, there is no way to select specific stripes. The entire file is always read. This is a gap compared to ParquetFileFragment, which provides row-group-level subsetting via `Subset()`, `row_groups()`, and `MakeFragment(..., row_groups)`.

### Details

Modeled after the `ParquetFileFragment` design, we introduce stripe-aware ORC fragments so callers can target specific stripes during planning and scanning (instead of always reading the full file). This adds a small, consistent surface area in both C++ (and Python, separate issue):
* An ORC-specific fragment type that can represent either the full file, or a subset of the file defined by stripe IDs
* Fragment subsetting via a `subset(...)`/`Subset(...)` API, analogous to Parquet row-group subsetting.
* Scan behavior that honors stripe selection, so execution reads only the requested stripes.
* Correct row counting for subset fragments, where row counts reflect only the selected stripes

### Component(s)

C++

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.