nuno-faria commented on code in PR #17528:
URL: https://github.com/apache/datafusion/pull/17528#discussion_r2348167812


##########
datafusion/expr/src/window_state.rs:
##########
@@ -90,7 +90,12 @@ impl WindowAggState {
         partition_batch_state: &PartitionBatchState,
     ) -> Result<()> {
         self.last_calculated_index += out_col.len();
-        self.out_col = concat(&[&self.out_col, &out_col])?;
+        // no need to use concat if the current `out_col` is empty

Review Comment:
   I don't think so, there is only an early exit if there is only a single 
array. I did a quick benchmark and confirmed that is considerably faster to use 
clone here.



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