-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
ARROW-11820: [Rust] Added macro to create native types #9597
Conversation
Thanks for opening a pull request! Could you open an issue for this pull request on JIRA? Then could you also rename pull request title in the following format?
See also: |
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 pending CI, thanks @elferherrera
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 good to me as well -- thanks @elferherrera
It also has the nice benefit that now the rust native type -> Arrow datatype mapping are clearer (e.g. i64
--> Int64, Date64, Time64, Timestamp)
data_type == &DataType::UInt32 | ||
} | ||
macro_rules! create_native { | ||
($native_ty:ty,$($impl_pattern:pat)|+) => { |
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.
Today I learned about :pat
!
Sorry that I didn't see this one previously |
This adds a macro called creative_native to avoid DRY in the creation of native types for alloc module Closes apache#9597 from elferherrera/dry-natives Authored-by: Fernando Herrera <fernando.elizalde@revolut.com> Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
This adds a macro called creative_native to avoid DRY in the creation of native types for alloc module Closes apache#9597 from elferherrera/dry-natives Authored-by: Fernando Herrera <fernando.elizalde@revolut.com> Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
This adds a macro called creative_native to avoid DRY in the creation of native types for alloc module