Rich-T-kid commented on code in PR #10945:
URL: https://github.com/apache/arrow-rs/pull/10945#discussion_r3910018486
##########
arrow-select/src/take.rs:
##########
@@ -1372,12 +1385,37 @@ pub fn take_record_batch(
record_batch: &RecordBatch,
indices: &dyn Array,
) -> Result<RecordBatch, ArrowError> {
- let columns = record_batch
- .columns()
- .iter()
- .map(|c| take(c, indices, None))
- .collect::<Result<Vec<_>, _>>()?;
- RecordBatch::try_new(record_batch.schema(), columns)
+ unsafe { take_record_batch_unchecked(record_batch, indices) }
Review Comment:
ah this is my mistake, was rushing when I pushed this and forgot to revert
this. this was only placed here to compare the existing benchmarks.
the point of introducing the unsafe `take_record_batch_unchecked` was to
allow users to opt into the unsafe code clearly, forcing them to add in unsafe
blocks to their code.
will remove
--
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]