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

Fix join of MultiIndex to Index with one column and overlapping name. #9830

Merged
merged 2 commits into from
Dec 3, 2021

Conversation

vyasr
Copy link
Contributor

@vyasr vyasr commented Dec 2, 2021

This PR resolves #9823

@vyasr vyasr added bug Something isn't working 2 - In Progress Currently a work in progress Python Affects Python cuDF API. non-breaking Non-breaking change labels Dec 2, 2021
@vyasr vyasr self-assigned this Dec 2, 2021
@vyasr
Copy link
Contributor Author

vyasr commented Dec 2, 2021

@shwina @bdice I believe I've fixed the underlying issue (the doctest @bdice linked on #9823 runs for me now and looks right) but I'd appreciate if one of you could add in a test then mark this as ready for review.

@vyasr
Copy link
Contributor Author

vyasr commented Dec 2, 2021

For future reference: the issue is that the truthiness of a tuple (None, ) is True, whereas bool(None) is False. The check needs to occur on the variable before it's wrapped in a non-empty container.

@vyasr
Copy link
Contributor Author

vyasr commented Dec 3, 2021

The failure looks to be due to the test from #9808. Not sure why that would start failing unless something is out of sync, so I'll try rerunning once before investigating any further.

rerun tests

@vyasr vyasr added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Dec 3, 2021
@vyasr vyasr marked this pull request as ready for review December 3, 2021 00:19
@vyasr vyasr requested a review from a team as a code owner December 3, 2021 00:19
@codecov
Copy link

codecov bot commented Dec 3, 2021

Codecov Report

Merging #9830 (5441f4f) into branch-22.02 (967a333) will decrease coverage by 0.01%.
The diff coverage is 9.01%.

Impacted file tree graph

@@               Coverage Diff                @@
##           branch-22.02    #9830      +/-   ##
================================================
- Coverage         10.49%   10.47%   -0.02%     
================================================
  Files               119      119              
  Lines             20305    20369      +64     
================================================
+ Hits               2130     2133       +3     
- Misses            18175    18236      +61     
Impacted Files Coverage Δ
python/cudf/cudf/__init__.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/_base_index.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/column/column.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/column/string.py 0.00% <ø> (ø)
python/cudf/cudf/core/frame.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/groupby/groupby.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/index.py 0.00% <ø> (ø)
python/cudf/cudf/core/indexed_frame.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/multiindex.py 0.00% <0.00%> (ø)
python/cudf/cudf/utils/cudautils.py 0.00% <0.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 50acf07...5441f4f. Read the comment docs.

Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

This fixes #9823 and the corresponding doctest in #9815. Thanks @vyasr @shwina!

python/cudf/cudf/tests/test_joining.py Show resolved Hide resolved
@shwina
Copy link
Contributor

shwina commented Dec 3, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit e82cc62 into rapidsai:branch-22.02 Dec 3, 2021
@vyasr vyasr deleted the fix/multiindex_join branch January 14, 2022 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Joining MultiIndex with Int64Index does not find common columns
3 participants