akupchinskiy commented on code in PR #27047:
URL: https://github.com/apache/datafusion/pull/27047#discussion_r4739420017


##########
datafusion/functions-aggregate/src/first_last.rs:
##########
@@ -930,6 +858,433 @@ impl<S: ValueState + 'static> GroupsAccumulator for 
FirstLastGroupsAccumulator<S
     }
 }
 
+/// The ordering values of each group's winner.
+enum GroupOrderings {
+    /// Arrow row format: comparing two orderings is a byte comparison and no
+    /// [`ScalarValue`] is built per group.
+    Rows(OrderingRows),
+    /// [`ScalarValue`]s compared with `compare_rows`, for ordering types whose
+    /// row encoding does not order like `compare_rows` (nested and union
+    /// types) or does not decode back to the planned type.
+    Scalars(ScalarOrderings),
+}
+
+/// Whether the arrow row encoding of `t` orders exactly like
+/// `compare_rows` over [`ScalarValue`]s: flat types, and dictionaries of them.

Review Comment:
   Nested types stay on the `ScalarValue` path here, so nothing changes for 
them; the row format orders lists with NULL elements differently (there is a 
test for it), so moving them to rows is a follow-up.



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