comphead commented on code in PR #3397:
URL: https://github.com/apache/datafusion-comet/pull/3397#discussion_r2771737268


##########
native/core/src/execution/planner.rs:
##########
@@ -1583,9 +1583,22 @@ impl PhysicalPlanner {
                     })
                     .collect();
 
+                // Ensure input is properly sorted when ORDER BY is present
+                // BoundedWindowAggExec requires InputOrderMode::Sorted
+                let needs_explicit_sort = !sort_exprs.is_empty();

Review Comment:
   `needs_explicit_sort` confusing IMO.
   
   can we just make a simple 
   ```
   if sort_exprs.is_empty() {plan } else { sort plan }
   ```



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