-
Notifications
You must be signed in to change notification settings - Fork 784
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
Use DictionaryArray's iterator in compare_dict_op
#1330
Conversation
compare_dict_op
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.
The only potential concern I have here is that the take_iter()s
use value()
instead of value_unchecked()
-- though perhaps we can merge this PR in and then add some additional unsafe / skipping bounds checking if it turns out to be in anyone's critical path / shows up in profiles
Thanks @viirya
let left_values = $left.values().as_any().downcast_ref::<$value_ty>().unwrap(); | ||
let right_values = $right | ||
|
||
let left_iter = $left |
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 sure looks much nicer 👍
Thanks @alamb . As we don't know if the keys in key iterator are fully in the valid range, seems we cannot skipping bounds check in |
That is true in general. However, if we are iterating over a set of keys from a known valid
I think this is wise strategy |
Thank you @alamb ! |
Which issue does this PR close?
Closes #1329.
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?