Repository navigation
docs: Document the doc field metadata key for PyArrow schemas - #4515
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fokko
approved these changes
Nov 29, 2026
Fokko
left a comment
Contributor
There was a problem hiding this comment.
Sounds reasonable, thanks for adding this @prateek11rai
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
🤖
claude-opus-5-5on behalf of PrateekRationale for this change
When a table is created from a PyArrow schema, column descriptions come from the
dockey in each field's metadata:The docs don't mention this key. A description stored under another key, such as
description, is not used, and there is no error, so the table ends up with no column descriptions. I ran into this writing a table with a few hundred described columns to a REST catalog and found the key by readingpyiceberg/io/pyarrow.py.This adds a description to one field in the "create a table using a pyarrow schema" example, and a short paragraph on the key, including that
union_by_namereads it too and that reading a table back into PyArrow sets it.Are these changes tested?
Docs only. I checked each statement against a local
SqlCatalog:create_tablewithdocstores the description in the table metadata and withdescriptionstores none,union_by_nameadds a new column's description, andscan().to_arrow()returns fields withdocmetadata.make lintpasses, andmkdocs build --strictpasses with the#union-by-namelink resolving.Are there any user-facing changes?
Docs only. No code changes.