alamb commented on code in PR #21383:
URL: https://github.com/apache/datafusion/pull/21383#discussion_r3045265807


##########
datafusion/functions-aggregate/src/first_last/state.rs:
##########
@@ -300,13 +300,9 @@ pub(crate) fn take_need(
         EmitTo::First(n) => {
             // split off the first N values in seen_values
             //
-            // TODO make this more efficient rather than two

Review Comment:
   nice



##########
datafusion/functions-aggregate/src/first_last.rs:
##########
@@ -426,7 +426,7 @@ impl<S: ValueState> FirstLastGroupsAccumulator<S> {
             return Ok(true);
         }
 
-        assert!(new_ordering_values.len() == self.ordering_req.len());
+        debug_assert!(new_ordering_values.len() == self.ordering_req.len());

Review Comment:
   I don't think these changes change the safety of this code (as in these 
asserts aren't being used to ensure `unsafe` code)



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