Dandandan commented on code in PR #7614:
URL: https://github.com/apache/arrow-rs/pull/7614#discussion_r2133588173
##########
arrow-select/src/coalesce.rs:
##########
@@ -242,14 +242,14 @@ impl BatchCoalescer {
/// However, after a while (e.g., after `FilterExec` or `HashJoinExec`) the
/// `StringViewArray` may only refer to a small portion of the buffer,
/// significantly increasing memory usage.
-fn gc_string_view_batch(batch: &RecordBatch) -> RecordBatch {
- let new_columns: Vec<ArrayRef> = batch
- .columns()
- .iter()
+fn gc_string_view_batch(batch: RecordBatch) -> RecordBatch {
+ let (schema, columns, num_rows) = batch.into_parts();
+ let new_columns: Vec<ArrayRef> = columns
Review Comment:
This is one of the reasons I think using `Vec` arrow-rs makes sense, there
are many optimizations that are not feasible to implement in arrow-rs.
--
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]