Hi all,

Following the page size thread [1], Jigao asked on the PR how row group
size relates to page size [2]. The row group section of the configuration
guide [3] has the same problem the page size section had.

The recommendation suggests 512MB to 1GB row groups to align them with HDFS
blocks which feels outdated. Implementations default to much smaller row
groups. parquet-java defaults to 128MB, and Arrow C++ and arrow-rs default
to 1Mi rows. Most data now lives on object storage, which has no blocks.

The section also says an entire row group might need to be read. Readers
read only the column chunks they project, and the page index lets them skip
pages inside a chunk.

I propose to replace the recommendation with the tradeoffs:

- Row group statistics let readers skip whole row groups, so smaller row
groups give finer pruning when the file has no page index.
- Many engines split work by row group, so the row group size limits read
parallelism for those engines.
- The writer buffers a whole row group before it writes the row group out,
so larger row groups use more writer memory.
- The footer has one entry per column chunk. Small row groups on wide
schemas make the footer large, and every reader parses the footer.

The section would also say how row groups relate to pages, and that no
single size fits all workloads.

If there is support, I will send a PR in the same style as the page size
change.

Cheers,
Alkis

[1] https://lists.apache.org/thread/4g8ng2mbrzj01g43dp8fcx7dz49rs529
[2] https://github.com/apache/parquet-site/pull/223
[3] https://parquet.apache.org/docs/file-format/configurations/

Reply via email to