You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/06/21 12:37:47 UTC
[GitHub] [arrow-rs] alamb commented on a diff in pull request #1904: not panic when given all nones to `FixedSizeBinaryArray::try_from_sparse_iter`
alamb commented on code in PR #1904:
URL: https://github.com/apache/arrow-rs/pull/1904#discussion_r902565038
##########
arrow/src/record_batch.rs:
##########
@@ -160,20 +160,27 @@ impl RecordBatch {
}
};
- // check that all columns match the schema
- let not_match = columns
- .iter()
- .zip(schema.fields().iter())
- .map(|(col, field)| (col.data_type(), field.data_type()))
- .enumerate()
- .find(type_not_match);
+ let is_all_nones = columns.iter().all(|x| {
Review Comment:
> My personal preference would be to make the try_from_sparse_iter method take the length of the arrays as an argument, rather than adding workarounds in other parts of the codebase
I think this sounds like the best of several non ideal options.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org