Reports the per-page index of each column chunk: where each data page sits in the file, which row it starts at, and the bounds and null count it declares. One row per page.
Value
A data frame with one row per page, ordered by row group, then column, then page, with the columns:
row_group1-based row-group ID, as
row_groups()reports it.column1-based physical column index, as
schema()reports it.pathComplete dotted column path; see
schema().page1-based page number within this column chunk, restarting at 1 for every chunk.
first_row0-based row within the row group where the page starts. The first page of a chunk is 0.
offsetByte offset of the page from the start of the file.
compressed_bytesSize of the page on disk.
null_countNulls on the page, or
NAwhen not recorded.null_pageWhether the page holds only nulls, in which case its bounds carry no information.
min,maxList columns of physical-level bounds, decoded as in
column_statistics();NULLwhen absent.
The two indexes are independent and either may be missing. first_row,
offset, and compressed_bytes come from the offset index and are NA
without it; null_count, null_page, min, and max come from the
column index and are NA or NULL without it.
Details
A page index is optional, and many writers omit it. Columns without one contribute no rows, so a file with no page index at all returns a zero-row data frame rather than an error. qio's own writer does not emit page indexes; see qio-limitations.
Like column_statistics(), the bounds are claims made by whoever wrote the
file. qio reports them and does not use them to skip pages.
Examples
# qio does not write page indexes, so a file it wrote has none and the
# result is empty rather than an error.
path <- tempfile(fileext = ".parquet")
write_parquet(data.frame(n = 1:10), path)
pf <- open_parquet(path)
nrow(page_index(pf))
#> [1] 0
close_parquet(pf)