-
Notifications
You must be signed in to change notification settings - Fork 662
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
Cleanup DynComparator (#2654) #4687
Conversation
($t:ty, $key_type_lhs:expr, $left:expr, $right:expr) => { | ||
cmp_dict_primitive::<$t>($key_type_lhs, $left, $right)? | ||
}; | ||
// TODO: Handle value nulls (#2687) |
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'm still thinking about how best to handle this, we could pass SortOptions to build_compare, but this would likely imply making build_compare always handle nulls
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.
Is #4691 the answer?
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.
Yes, it provides a way for users of DynComparator to "see" these nulls
let left = left.as_dictionary::<K>(); | ||
let right = right.as_dictionary::<K>(); | ||
|
||
let cmp = build_compare(left.values().as_ref(), right.values().as_ref())?; |
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.
This approach significantly reduces codegen and does not appear to impact performance
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.
Looks like a very nice cleanup to me -- 👍 @tustvold 🧹
($t:ty, $key_type_lhs:expr, $left:expr, $right:expr) => { | ||
cmp_dict_primitive::<$t>($key_type_lhs, $left, $right)? | ||
}; | ||
// TODO: Handle value nulls (#2687) |
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.
Is #4691 the answer?
Which issue does this PR close?
Closes #2654
Rationale for this change
Cleans up the code and improves the type coverage. I have confirmed that this does not impact any benchmarks
What changes are included in this PR?
Are there any user-facing changes?