Repository navigation
Return weak orderings from device_row_comparator. - #10793
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-22.06 #10793 +/- ##
================================================
- Coverage 86.40% 86.29% -0.11%
================================================
Files 143 143
Lines 22448 22597 +149
================================================
+ Hits 19396 19501 +105
- Misses 3052 3096 +44
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
I don't know where or when this precisely needs to be done, but I'd like some words written about the equality comparator vs this comparator with weak_ordering::equivalent. The former should always be preferred in operations where you're only concerned with equality (like groupby/join/etc). This is because it will be more efficient than using this comparator with the weak_ordering::equivalent which would require doing two operator< vs a single operator==, which is important for something like strings.
In other words, I don't want us to ever define a: |
bdice
left a comment
There was a problem hiding this comment.
This is surprisingly clean with the use of a parameter pack fold expression. Awesome suggestion @jrhemstad, and nice work implementing it @rwlee.
@rwlee showed me benchmarks offline (which I think he is going to paste here soon) and these changes didn't seem to have any negative performance impact.
With the documentation suggestion below, I approve.
Co-authored-by: Bradley Dice <[email protected]>
Benchmarks were posted above #10793 (comment) -- linking down here so they can be found after the review comment it is resolved. |
device_row_comparator.
|
@rwlee I edited the PR title and description to make it clearer what this is doing -- see these previous comments: |
device_row_comparator.device_row_comparator.
| using less_equivalent_comparator = weak_ordering_comparator_impl<device_row_comparator<Nullate>, | ||
| weak_ordering::LESS, | ||
| weak_ordering::EQUIVALENT>; | ||
|
|
There was a problem hiding this comment.
It would be useful to have aliases for the remaining comparator too (i.e., > and >=).
There was a problem hiding this comment.
Then how about less_equivalent_comparator? We are not using it now, right?
| namespace cudf { | ||
|
|
||
| namespace experimental { |
There was a problem hiding this comment.
| namespace cudf { | |
| namespace experimental { | |
| namespace cudf::experimental { |
There was a problem hiding this comment.
This file has several layers of nested namespaces. For consistency, I would recommend leaving this unchanged.
|
@gpucibot merge |
This PR changes the experimental
device_row_comparatorto returnweak_orderinginstead ofbool.Originally part of PR #9452. Aids PR #10730, which builds strongly-typed two table comparators and should return a
weak_ordering.