-
Notifications
You must be signed in to change notification settings - Fork 849
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
Add add_dyn for DictionaryArray support #1951
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1951 +/- ##
=======================================
Coverage 83.47% 83.48%
=======================================
Files 221 221
Lines 57054 57106 +52
=======================================
+ Hits 47626 47675 +49
- Misses 9428 9431 +3
Continue to review full report at Codecov.
|
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.
Thank you @viirya -- I went through this PR and it looks good to me.
I am surprised at the amount of code required for this but I tried and couldn't really figure out any better way (as the macros are basically implementing all the type dispatch to then call add
).
.take_iter_unchecked($right.keys_iter()) | ||
}; | ||
|
||
let result = left_iter |
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 is very nice 👌
fn test_primitive_array_add_dyn_dict() { | ||
let key_builder = PrimitiveBuilder::<Int8Type>::new(3); | ||
let value_builder = PrimitiveBuilder::<Int32Type>::new(2); | ||
let mut builder = PrimitiveDictionaryBuilder::new(key_builder, value_builder); |
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 it would be good to have at least one null
value (via append_null
) to make sure that works correctly
I have tried to use nested macro with repetition (the |
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!
There are lots of places in our code where we map |
Thanks @alamb @martin-g @HaoYang670 |
Which issue does this PR close?
Closes #1950.
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?