Pandas 3 compat and more recent pyarrow versions - #248
Merged
Conversation
Member
Author
|
Things are green for the nightly as well, see https://github.com/data-engineering-collective/plateau/actions/runs/16490435763 |
There was a problem hiding this comment.
Pull Request Overview
This PR implements compatibility for Pandas 3.x and support for newer PyArrow versions (19.0.1 and 20.0.0). The changes focus on handling Pandas 3's new string inference behavior and PyArrow schema differences.
- Updates compatibility handling for Pandas 3's string type inference
- Adds support for PyArrow versions 19.0.1 and 20.0.0 with compatibility fixes
- Refactors deprecated DataFrame operations to use modern syntax
Reviewed Changes
Copilot reviewed 25 out of 30 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| plateau/core/_compat.py | Adds PANDAS_3 flag and pandas_infer_string() helper |
| tests/serialization/test_parquet.py | Updates string dtype handling for Pandas 3 compatibility |
| tests/serialization/test_filter.py | Adds datetime precision filtering tests |
| plateau/serialization/_parquet.py | Updates large_string type handling and coercion parameters |
| plateau/io_components/metapartition.py | Updates metadata schema for string inference |
| pyproject.toml | Updates PyArrow version constraints |
fjetter
marked this pull request as ready for review
July 24, 2025 09:41
fjetter
commented
Jul 24, 2025
| @@ -5,8 +5,9 @@ Changelog | |||
| Plateau 4.5.0 (XXXX-XX-XX) | |||
Member
Author
There was a problem hiding this comment.
I'll update the date once approved and release afterwards
Member
Author
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.
This restores compatibility with pandas 3.x and tests against latest pyarrow versions
The changes can be summarized as
strdata type which is an extension array backed by pyarrow. Since parquet files are not impacted, this is purely a runtime type issue and future/backwards compatibility won't be affectedpyarrow.large_stringinstead ofpyarrow.stringdtypes. This is indeed affecting our arrow level (possibly parquet?) code which is primarily user facing when casting values in predicate evaluation, i.e. filters might not work as expected on older plateau versions with newer pandas