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

GH-36240: [Python] Refactor CumulativeSumOptions to a separate class for independent deprecation #36977

Merged
merged 21 commits into from
Aug 22, 2023

Conversation

R-JunmingChen
Copy link
Contributor

@R-JunmingChen R-JunmingChen commented Aug 1, 2023

Rationale for this change
As #36240 says, we refactor CumulativeSumOptions to a separate class.

What changes are included in this PR?

Are these changes tested?
No.
Actually, the PR can't pass the test_option_class_equality in test_compute.py (Error example). Cause CumulativeSumOptions's C++ part is also CumulativeOptions.
image

Are there any user-facing changes?
No.

Closes: #36240

@R-JunmingChen R-JunmingChen marked this pull request as ready for review August 1, 2023 14:51
@R-JunmingChen R-JunmingChen marked this pull request as draft August 1, 2023 15:10
@R-JunmingChen R-JunmingChen marked this pull request as ready for review August 1, 2023 15:31
@R-JunmingChen
Copy link
Contributor Author

R-JunmingChen commented Aug 1, 2023

Hi, reviewers,here are two choices to handle the problem the PR can't pass test_option_class_equality. Do you have any ideas about it?

  1. We ignore it, this unequality seems to have no impact on usage for users.
  2. We also make CumulativeSumOptions an independent class in C++.

@R-JunmingChen R-JunmingChen marked this pull request as draft August 1, 2023 15:56
Copy link
Member

@danepitkin danepitkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the failing test, we can just add an explicit check for CumulativeSumOptions == CumulativeOptions. We can add a TODO comment to remove the check when the deprecated class is removed.

python/pyarrow/_compute.pyx Outdated Show resolved Hide resolved
python/pyarrow/_compute.pyx Outdated Show resolved Hide resolved
python/pyarrow/_compute.pyx Show resolved Hide resolved
python/pyarrow/_compute.pyx Outdated Show resolved Hide resolved
@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 1, 2023
@R-JunmingChen R-JunmingChen marked this pull request as ready for review August 2, 2023 00:47
@danepitkin
Copy link
Member

One suggestion, otherwise LGTM! Nice work! I'll add an Arrow committer to the reviewer's list.

Copy link
Member

@AlenkaF AlenkaF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1

Just a small nitpick suggestion for clearer understanding of the TODO, then I will merge 👍

python/pyarrow/tests/test_compute.py Outdated Show resolved Hide resolved
@AlenkaF
Copy link
Member

AlenkaF commented Aug 22, 2023

Thanks!

@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit fe750ed.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them.

jorisvandenbossche pushed a commit that referenced this pull request Aug 23, 2023
…eSumOptions refactor (#37305)

### Rationale for this change

Merging of #36977 caused a CI failure due to a test giving a warning.

### What changes are included in this PR?

Add a `filterwarnings` mark to the failing tests. This also tests the deprecation message.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: #37303

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…class for independent deprecation (apache#36977)

**Rationale for this change**
As apache#36240 says, we refactor CumulativeSumOptions to a separate class.

**What changes are included in this PR?**

- independent CumulativeSumOptions 
- the original simple test before apache#32190 
- fix a typo in CumulativeOptions 

**Are these changes tested?**
No.
Actually, the PR can't pass the `test_option_class_equality` in test_compute.py ([Error example](https://github.com/apache/arrow/actions/runs/5728571658/job/15523443371?pr=36977)). Cause CumulativeSumOptions's C++ part is also CumulativeOptions.
![image](https://github.com/apache/arrow/assets/18380073/0a173684-47f8-4eb9-b8f4-ba72aa5aab97)

**Are there any user-facing changes?**
No.

Closes: apache#36240
* Closes: apache#36240

Lead-authored-by: Junming Chen <[email protected]>
Co-authored-by: Dane Pitkin <[email protected]>
Co-authored-by: Alenka Frim <[email protected]>
Signed-off-by: AlenkaF <[email protected]>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…ulativeSumOptions refactor (apache#37305)

### Rationale for this change

Merging of apache#36977 caused a CI failure due to a test giving a warning.

### What changes are included in this PR?

Add a `filterwarnings` mark to the failing tests. This also tests the deprecation message.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: apache#37303

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
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] Refactor CumulativeSumOptions to a separate class for independent deprecation
3 participants