-
Notifications
You must be signed in to change notification settings - Fork 824
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
Introduce Compare
to support nulls comparison
#5672
Conversation
Signed-off-by: jayzhan211 <[email protected]>
Signed-off-by: jayzhan211 <[email protected]>
Signed-off-by: jayzhan211 <[email protected]>
Signed-off-by: jayzhan211 <[email protected]>
} | ||
|
||
#[inline] | ||
pub fn is_null(&self) -> bool { |
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.
Note: not used
Signed-off-by: jayzhan211 <[email protected]>
As stated on the ticket, this needs more thought as it won't work for distinct, it is on my list to work out a way to support this but I haven't had time recently. Edit: it is possible I just had a brain fart, I think we should mock up something showing this works for distinct and then we can move forward with this. We should probably double check this doesn't regress the lexsort benchmarks as well |
/// Compare the values at two arbitrary indices in two arrays. | ||
pub type DynComparator = Box<dyn Fn(usize, usize) -> Ordering + Send + Sync>; | ||
pub type DynComparator = Box<dyn Fn(usize, usize) -> Compare + Send + Sync>; |
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.
Currently this will be a breaking change, we might want to make this change additive and deprecate DynComparator
instead
@@ -725,16 +726,19 @@ impl LexicographicalComparator { | |||
None => (true, true), | |||
}; | |||
|
|||
// TODO: after dict values with nulls are supported, we can compare with |
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 this will probably be necessary to avoid this change regressing the performance of lexsort
Which issue does this PR close?
First step of #5426, support existing comparator, exclude list
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?