-
Notifications
You must be signed in to change notification settings - Fork 32
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
Into arrow with hint #1730
Into arrow with hint #1730
Conversation
…rt to a target arrow data_type
603142b
to
b0de02d
Compare
// Note, arrow::cast clones the array, so don't use it if unnecessary. | ||
Ok(match data_type { | ||
DataType::Binary | DataType::LargeBinary | DataType::Utf8 | DataType::LargeUtf8 => { | ||
array_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 doesn't make much sense to me. You switch on the requested data type, then you return whatever into_arrow returns without checking the data_type actually matches?
Shouldn't it be more like if array_ref.data_type() != data_type { array_ref = cast(...) }
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.
agreed
fn into_arrow(self) -> VortexResult<ArrayRef> { | ||
fn into_arrow(self) -> VortexResult<ArrayRef> | ||
where | ||
Self: Sized, |
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.
Why does this need Self: Sized but into_canonical doesn't?
No description provided.