Skip to content

GH-51265: [Python][Parquet] Reorganize Parquet reader docstrings - #51644

Closed
dannyshafer wants to merge 1 commit into
apache:mainfrom
dannyshafer:GH-51265-parquet-reader-docstrings
Closed

dannyshafer wants to merge 1 commit into
apache:mainfrom
dannyshafer:GH-51265-parquet-reader-docstrings

Conversation

@dannyshafer

@dannyshafer dannyshafer commented Sep 29, 2026 •

Copy link
Copy Markdown

Rationale for this change

The Python Parquet reader docstrings (ParquetFile, ParquetDataset, read_table and read_pandas) each repeated the descriptions of common options such as thrift_string_size_limit, and the copies had drifted slightly apart. Closes #51265.

What changes are included in this PR?

  • The shared parameter descriptions now live in module-level snippets next to the existing _read_docstring_common: _read_docstring_file_options (read_dictionary through buffer_size), _read_docstring_partitioning, _read_docstring_filesystem, _read_docstring_reader_options (pre_buffer through schema_depth_limit) and _read_docstring_checksum_options (page_checksum_verification, arrow_extensions_enabled). _read_docstring_common is kept, built from the first two.
  • ParquetFile.__doc__ becomes an f-string built from these snippets, the same way ParquetDataset.__doc__ already is. That is why its body is dedented in the diff.
  • ParquetDataset.__doc__, read_table.__doc__ and read_pandas.__doc__ use the same snippets.
  • Where copies differed, the most complete wording was kept. For example, read_table now gets the full pre_buffer text (S3, GCS and the memory-usage note), ParquetFile gets the full read_dictionary description (I checked that ParquetFile(..., read_dictionary=["s.x"]) does accept nested column paths), and decryption_properties mentions both Parquet Modular Encryption and CryptoFactory.file_decryption_properties().

Are these changes tested?

This is a docstring-only change. I rendered the four docstrings before and after and diffed them: apart from the wording unifications above, the content is identical. I also ran the ParquetFile docstring examples with doctest and ran flake8 --config python/setup.cfg and autopep8 --diff on the file (both clean).

Are there any user-facing changes?

Only the rendered docstrings. They are now consistent across the four readers.

Was AI used for this PR?

In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.

This PR was prepared with Claude Code, which wrote the refactor, compared the rendered docstrings before and after, and drafted this description.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

Move the parameter descriptions shared by ParquetFile, ParquetDataset,
read_table and read_pandas into module-level snippets and reuse them in
each docstring, keeping the most complete wording of each description.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UtEFtop6ABsZFiyeX2cu5g
@github-actions

Copy link
Copy Markdown

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

@thisisnic

Copy link
Copy Markdown
Member

Thanks for the PR. I’m closing it because Arrow’s contributor guidelines require that AI-generated code be reviewed and understood by the person submitting it:

Only submit a PR if you are able to debug and own the changes yourself – review all generated code to understand every detail

Once you’ve reviewed the changes and can own them yourself, you’re welcome to open a new PR.

@thisisnic thisisnic closed this Oct 12, 2026
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.

[Python][Parquet] Reorganize Parquet reader docstrings

3 participants