-
Notifications
You must be signed in to change notification settings - Fork 13
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
Pass target arrow type to array_decoder_factory #92
Conversation
I plan to take a look at this later today 👍 |
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.
Thanks @progval, this API looks good to me overall 👍
One thing I'm concerning is we may also need to provide a method that can convert ORC type to Arrow type, the so-called "default" option (or there is one and I miss it?). Otherwise the external user of array_decoder_factory
needs to maintain that mapping by themselves.
pub fn array_decoder_factory( | ||
column: &Column, | ||
field: Arc<Field>, | ||
stripe: &Stripe, | ||
) -> Result<Box<dyn ArrayBatchDecoder>> { |
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 key API change 👍
Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
Yes, I'm planning to add it after #93 is merged. Probably |
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.
Do you think it's possible to store the Field
inside Column
itself, considering it's already storing DataType
?
Lines 15 to 21 in ac5a8ab
#[derive(Debug)] | |
pub struct Column { | |
number_of_rows: u64, | |
footer: Arc<StripeFooter>, | |
name: String, | |
data_type: DataType, | |
} |
Might cut down on having to pass field everywhere 🤔
It looked like a good idea, but it actually complexifies everything:
|
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.
Thanks for this, and thanks for the detailed breakdown on my suggestion ❤️
* Pass target arrow type to array_decoder_factory * Remove debug prints Co-authored-by: Ruihang Xia <waynestxia@gmail.com> --------- Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
This is the prerequisite to support configurable timestamp precision mentioned in #75 (comment)