Samyak2 commented on code in PR #20500:
URL: https://github.com/apache/datafusion/pull/20500#discussion_r3130639259


##########
datafusion/physical-plan/src/common.rs:
##########
@@ -204,6 +205,31 @@ pub fn can_project(
     }
 }
 
+/// Return a new `RecordBatch` with [`StringViewArray::gc`] called on such 
columns (if any).
+pub(crate) fn gc_stringview_arrays(
+    batch: RecordBatch,
+) -> Result<RecordBatch, ArrowError> {
+    let mut new_columns: Vec<Arc<dyn Array>> = 
Vec::with_capacity(batch.num_columns());
+
+    let mut arr_mutated = false;
+    for array in batch.columns() {
+        if let Some(string_view_array) = 
array.as_any().downcast_ref::<StringViewArray>()
+        {
+            let new_array = string_view_array.gc();

Review Comment:
   @Dandandan I see that you had tried moving the coalesce upstream in 
repartition here: https://github.com/apache/datafusion/pull/21550
   But looks like you closed it. I see an improvement in clickbench from the 
benchmarks there. Why was it closed?
   
   I noticed that the morsel PRs are now merged, so I was planning to try out 
moving the coalesce to the producer.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to