Skip to content

Parquet v2.0 deprecated #12298

Closed
Closed

Description

@nstarman

Description

FutureWarning: Parquet format '2.0' pseudo version is deprecated, use '2.4' or '2.6' for fine-grained feature selection

See https://github.com/astropy/astropy/runs/4012372350?check_suite_focus=true

@erykoff, could you take a look at this. Thanks!

Steps to Reproduce

Run CI on any PR.

System Details

tox -e py38-test-alldeps-numpy118-cov-clocale -- --remote-data=astropy

Activity

  1. added this to the v5.0 milestone on Oct 26, 2021
  2. pllim commented on Oct 26, 2021

    @pllim
    Member

    Well, that was fast. #12215 was only merged recently... This is blocking CI on other unrelated PRs, so hopefully a quick fix is possible.

  3. pllim commented on Oct 26, 2021

    @pllim
    Member

    Maybe it is as simple as changing this line to use '2.4'?

    with parquet.ParquetWriter(output, schema, version='2.0') as writer:

  4. erykoff commented on Oct 26, 2021

    @erykoff
    Contributor

    pyarrow 6.0.0 just came out but isn't on conda forge yet. And I can't even find any documentation on pyarrow 6 about what these version strings mean, or if you can use them with pyarrow 5.0.0 ...

  5. WilliamJamieson commented on Oct 26, 2021

    @WilliamJamieson
    Contributor

    Maybe it is as simple as changing this line to use '2.4'?

    with parquet.ParquetWriter(output, schema, version='2.0') as writer:

    In local testing this appears to fix some (all but 2) of the test failures.

  6. WilliamJamieson commented on Oct 26, 2021

    @WilliamJamieson
    Contributor

    Looks like there are some changes in tests along this line too. These map to the remaining tests which were failing.

    with parquet.ParquetWriter(filename, schema, version='2.0') as writer:

    df.to_parquet(filename, version='2.0')

  7. erykoff commented on Oct 26, 2021

    @erykoff
    Contributor

    Problem is that 2.4 doesn't work with pyarrow 5.0.0. I think we need to pin pyarrow, or do a noqa mark.

  8. erykoff commented on Oct 26, 2021

    @erykoff
    Contributor

    Checking the version of pyarrow is also possible, but I'm not sure if that's wise.

  9. WilliamJamieson commented on Oct 26, 2021

    @WilliamJamieson
    Contributor

    Problem is that 2.4 doesn't work with pyarrow 5.0.0. I think we need to pin pyarrow, or do a noqa mark.

    Unfortunately, you are correct '2.4' fails when pyarrow is 5.0.

  10. WilliamJamieson commented on Oct 26, 2021

    @WilliamJamieson
    Contributor

    @erykoff it looks like we will have to check the pyarrow version to set the version for parquet or pin pyarrow. Is there a preference?

  11. erykoff commented on Oct 26, 2021

    @erykoff
    Contributor

    My preference is to pin pyarrow for now, and exploration on updating support for both can come later.

  12. pllim commented on Oct 26, 2021

    @pllim
    Member

    exploration on updating support for both can come later

    Once we pin a minversion, we usually do not go back and try to support the older one in the future. FYI.

  13. erykoff commented on Oct 26, 2021

    @erykoff
    Contributor

    I think we need to pin a min/max version right now at 5, since 6 isn't widely available.

  14. pllim commented on Oct 26, 2021

    @pllim
    Member

    Ah, ok...

  15. WilliamJamieson commented on Oct 26, 2021

    @WilliamJamieson
    Contributor

    PR #12300 fixes the issue via a minversion for pyarrow. I am happy to change this, but 6 is now on pypy and is what pip install pyarrow now installs.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions