-
Notifications
You must be signed in to change notification settings - Fork 651
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-#7329: Do not sort columns on df.update #7330
Conversation
Signed-off-by: Igoshev, Iaroslav <iaroslav.igoshev@intel.com>
@@ -3886,7 +3886,7 @@ def n_ary_op( | |||
1, | |||
new_right_frames, | |||
join_type, | |||
sort=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was sort=True
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to add more tests because you are changing the behavior of a low-level function that is used to implement many high-level functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My assumption is that someone was thinking this should work for all cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What tests would you suggest to add?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have pretty extensive test suite for checking high-level functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My assumption is that someone was thinking this should work for all cases.
Why do you think that this should always work without sorting now? My doubts, for example, are based on this line:
sort=not self.get_axis(axis).equals(other.get_axis(axis)), |
What tests would you suggest to add?
I don't have any specific functions, you can add for any few you find.
We already have pretty extensive test suite for checking high-level functions.
I'm not sure we wrote many tests taking into account the order of the columns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, handling sort here is a bit tricky. Changed the logic and added a test for some bin op.
Signed-off-by: Igoshev, Iaroslav <iaroslav.igoshev@intel.com>
sort=True, | ||
sort=( | ||
not all( | ||
self.get_axis(1).equals(right.get_axis(1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to move this logic to def _copartition
and do this there if sort is None?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, done
Signed-off-by: Igoshev, Iaroslav <iaroslav.igoshev@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @YarShev !
…ct#7330) Signed-off-by: Igoshev, Iaroslav <iaroslav.igoshev@intel.com>
…ct#7330) Signed-off-by: Igoshev, Iaroslav <iaroslav.igoshev@intel.com>
What do these changes do?
flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
git commit -s
docs/development/architecture.rst
is up-to-date