You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Parquet] Support returning RowGroupIndex as a column #8641
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Based on a discord thread
@adriangb suggests it would be very useful to be able to get row groups out of a parquet scan, to for example build secondary indexes at the row group level.
For example it would be really nice to compute per-row group statistics to create a secondary index with a query like this
select
row_group_id, <-- would like to get the row group id from the readermin(col),
max(col)
from t
group by
row_group_id
Describe the solution you'd like
I would like a way to specify a "row group" column from the reader. If a file contained columns A and B, with this feature the reader would also produce a new column row_group_index:
A
B
row_group_index
10
v
0 (first row group)
20
d
0
40
a
0
...
...
...
90
z
1 (second row group)
50
f
1
...
...
...
10
b
2 (third row group)
60
a
2
...
...
...
Describe alternatives you've considered
The hardest part of this issue is figuring out what the API to request this extra column should look like
Additional context
Very similar to the request to add row numbers:
changed the title [-]Support returning RowGroupIndex as a column from parquet reader[/-][+][Parquet] Support returning RowGroupIndex as a column[/+]on Nov 6, 2025
I was thinking filename is probably more appropriate for DataFusion to add (similar to a partition column) -- as in the parquet-rs land there is only ever one file...
Activity
[-]Support returning RowGroupIndex as a column from parquet reader[/-][+][Parquet] Support returning RowGroupIndex as a column[/+]adriangb commentedon Nov 6, 2025
FWIW DuckDB lets you request filename and row number: https://duckdb.org/docs/stable/data/parquet/overview#parameters
alamb commentedon Nov 7, 2025
I was thinking
filenameis probably more appropriate forDataFusionto add (similar to a partition column) -- as in the parquet-rs land there is only ever one file...[parquet] Add row group index virtual column (#9117)