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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]