Skip to content

GH-50619 [Python][Parquet] Expose size statistics level in the Parquet writer#50621

Open
abaybek wants to merge 1 commit into
apache:mainfrom
abaybek:feature/python_parquet_size_statistics
Open

GH-50619 [Python][Parquet] Expose size statistics level in the Parquet writer#50621
abaybek wants to merge 1 commit into
apache:mainfrom
abaybek:feature/python_parquet_size_statistics

Conversation

@abaybek

@abaybek abaybek commented Jul 23, 2026

Copy link
Copy Markdown

Rationale for this change

Add a write_size_statistics keyword to pyarrow.parquet.write_table, ParquetWriter, and the dataset write path. It exposes the C++ parquet::WriterProperties::Builder::set_size_statistics_level setter introduced in GH-40592, accepting "none", "columnchunk", or "pageandcolumnchunk" (None keeps the Arrow C++ default of "pageandcolumnchunk").

Size statistics are written by default, and until now there was no way to disable or tune them from PyArrow. "none" turns them off entirely..

What changes are included in this PR?

Python/Cython client only — no C++ changes (the underlying setter already exists since Arrow 19.0.0).

Are these changes tested?

Yes, added a test cases to python/pyarrow/tests/parquet/test_basic.py. Also tested against legacy readers.

Are there any user-facing changes?

Yes, a new optional write_size_statistics keyword.

Add a `write_size_statistics` keyword to `pyarrow.parquet.write_table`,
`ParquetWriter`, and the dataset write path. It exposes the C++
`parquet::WriterProperties::Builder::set_size_statistics_level` setter
introduced in apacheGH-40592, accepting "none", "columnchunk", or
"pageandcolumnchunk" (None keeps the Arrow C++ default of
"pageandcolumnchunk").

Size statistics are written by default, and until now there was no way to
disable or tune them from PyArrow. "none" turns them off entirely; page
level statistics additionally require the page index to be enabled.
@abaybek
abaybek requested review from AlenkaF, raulcd and rok as code owners July 23, 2026 18:58
@github-actions

Copy link
Copy Markdown

Thanks for opening a pull request!

This pull request has been automatically converted to a draft because its title doesn't match Arrow's required format.

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

After updating the title, you can mark the pull request as ready for review.

See also:

@github-actions
github-actions Bot marked this pull request as draft July 23, 2026 18:59
@abaybek abaybek changed the title [Python][Parquet] Expose size statistics level in the Parquet writer GH-50619 [Python][Parquet] Expose size statistics level in the Parquet writer Jul 23, 2026
@abaybek
abaybek marked this pull request as ready for review July 23, 2026 19:04
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50619 has been automatically assigned in GitHub to PR creator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant