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


##########
datafusion/functions-aggregate/src/first_last.rs:
##########
@@ -458,6 +459,16 @@ struct FirstLastGroupsAccumulator<S: ValueState> {
     // and `update_batch` takes the comparison-free fast path.
     is_input_pre_ordered: bool,
     default_orderings: Vec<ScalarValue>,
+    // The time zone of each ordering column that is a time zone aware
+    // timestamp, `None` for every other column.
+    //
+    // Such columns are stored in `orderings` without their time zone.

Review Comment:
   This feels very much like fixing a symptom rather than the underlying problem
   
   If the problem is high per-scalar value overhead I think we should be 
working on how to  avoid using ScalarValue (e.g. use ArrayRef) rather than this 
hack of trying to remove a refcount. 



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