alamb commented on code in PR #7625:
URL: https://github.com/apache/arrow-rs/pull/7625#discussion_r2134634467


##########
arrow-select/src/coalesce.rs:
##########
@@ -264,42 +268,73 @@ fn gc_string_view_batch(batch: &RecordBatch) -> 
RecordBatch {
                 })
                 .sum();
             let actual_buffer_size = s.get_buffer_memory_size();
+            let buffers = s.data_buffers();
 
             // Re-creating the array copies data and can be time consuming.
             // We only do it if the array is sparse
             if actual_buffer_size > (ideal_buffer_size * 2) {
+                if ideal_buffer_size == 0 {
+                    // If the ideal buffer size is 0, all views are inlined
+                    // so just reuse the views
+                    return Arc::new(unsafe {

Review Comment:
   I ran codecov and this is the only path that is not covered
   ```shell
   cargo llvm-cov  --html -p arrow-select
   ```
   
   I think I can cover it with a sliced record batch. I will write some tests 
as a follow on PR to cover it



-- 
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]

Reply via email to