Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Pandas 2.1 fails some categorical tests #28638

Open
1 of 15 tasks
caneff opened this issue Sep 24, 2023 · 3 comments
Open
1 of 15 tasks

[Bug]: Pandas 2.1 fails some categorical tests #28638

caneff opened this issue Sep 24, 2023 · 3 comments

Comments

@caneff
Copy link
Contributor

caneff commented Sep 24, 2023

What happened?

When trying to support Pandas 2.1, pytest frames_test.py::GroupByTest::test_groupby_level_agg_3
fails with

E       AssertionError: Expression does not preserve partitioning!
E                       Expression: ComputedExpression[pre_combine_max_Series_139900651301776]
E                       Requires: Arbitrary
E                       Preserves: Arbitrary
E                       Input partitioning: Index
E                       Expected output partitioning: Index

Also, test_groupby_level_agg_6 fails the same way.

Note if I change test_groupby_level_agg_3 in the parameterized setup to be [3,0] instead of [0, 3] (so the categorical is first instead of last) it doesn't fail, but if I change test_groupby_level_agg_6 from [1, 'str'] to ['str', 1] it still fails, so it isn't a clearcut answer there.

I suspect this and #28637 are intertwined.

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
@caneff
Copy link
Contributor Author

caneff commented Sep 24, 2023

R: @tvalentyn

@tvalentyn
Copy link
Contributor

cc: @robertwb who might have ideas.

@caneff
Copy link
Contributor Author

caneff commented Oct 3, 2023

Chased this down and found the underlying pandas issue is that df.sort_index() isn't actually sorting under some arcane circumstances that aren't clear to me yet. Issue here: pandas-dev/pandas#55379

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

No branches or pull requests

2 participants