Skip to content

[SPARK-38982][PYTHON][PS][TESTS] Skip categories setter test #36355

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

Closed
wants to merge 1 commit into from

Conversation

Yikun
Copy link
Member

@Yikun Yikun commented Apr 26, 2022

What changes were proposed in this pull request?

Since pandas-dev/pandas@126a19d, pandas changes behavior.

Before pandas 1.4, the pandas will refresh dtypes according to categories, since panda 1.4, categories.setter dtype refresh will not work. According to pandas-dev/pandas#46820 , the complete support of categories.setter will never back.

And also only categories is refreshed (but dtype not) is useless behavior so we'd better to only fix test and keep current PS behavior, then remove this setter support when we remove all deprecated methods.

Why are the changes needed?

Make CI passed with pandas 1.4.x

Does this PR introduce any user-facing change?

No

How was this patch tested?

test_categories_setter passed with 1.3.X and also 1.4.x

@Yikun
Copy link
Member Author

Yikun commented Apr 26, 2022

BTW, we added the categories setter since #33448 .

@Yikun Yikun marked this pull request as ready for review April 26, 2022 09:17
@Yikun Yikun marked this pull request as draft April 26, 2022 09:18
@Yikun
Copy link
Member Author

Yikun commented Apr 26, 2022

Hold on this until pandas-dev/pandas#46820 (comment)

@Yikun Yikun marked this pull request as ready for review May 5, 2022 03:17
@Yikun Yikun marked this pull request as draft May 5, 2022 03:28
@itholic
Copy link
Contributor

itholic commented May 24, 2022

Seems like they replied pandas-dev/pandas#46820 (comment).

Maybe can we just close ?

@Yikun
Copy link
Member Author

Yikun commented May 24, 2022

@itholic Now we'd better to only fix test (otherwise, will raise error when upgrade to pandas 1.4), becasue categories.setter will not be supported completely in Pandas, and also some inplace update methods like set_categories are deprecated.

So, I suggest only fix test and keep current behavior, then remove this setter support when we remove all deprecated methods.

@Yikun Yikun marked this pull request as ready for review May 24, 2022 07:41
@Yikun
Copy link
Member Author

Yikun commented May 24, 2022

@itholic I plus some note on code and PR descirption, and mark it read for review, thanks for reminder!

@Yikun Yikun changed the title [SPARK-38982][PYTHON] Skip categories setter test [SPARK-38982][PYTHON][PS][TESTS] Skip categories setter test May 24, 2022
@itholic
Copy link
Contributor

itholic commented May 25, 2022

Got it! Looks good.

@HyukjinKwon
Copy link
Member

Merged to master.

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.

3 participants