ozankabak commented on code in PR #5587:
URL: https://github.com/apache/arrow-datafusion/pull/5587#discussion_r1139268375


##########
datafusion/core/src/physical_plan/windows/bounded_window_agg_exec.rs:
##########
@@ -548,9 +548,9 @@ impl SortedPartitionByBoundedWindowStream {
             for (partition_row, WindowState { state: value, .. }) in 
window_agg_state {
                 let n_prune =
                     min(value.window_frame_range.start, 
value.last_calculated_index);
-                if let Some(state) = 
n_prune_each_partition.get_mut(partition_row) {
-                    if n_prune < *state {
-                        *state = n_prune;
+                if let Some(current) = 
n_prune_each_partition.get_mut(partition_row) {

Review Comment:
   Right, this is a drive-by cleanup. There were too many `state`s going around 
making it hard to read 🙂 



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