jayzhan211 commented on issue #15676:
URL: https://github.com/apache/datafusion/issues/15676#issuecomment-2796621637

   > Just to clarify, what does "order-preserved" mean exactly? Does it only 
refer to a single partition with ordered input, or can the order be determined 
by ORDER BY fields?
   
   The input of first/last is the same as the data in data source.
   
   > I don't understand why we should "return the first value among those "last 
values" with the same ordering keys". If the ordering keys are the same, the 
result may still be non-deterministic unless the input is ordered and in a 
single partition.
   
   This case is single partition (order-preserved) + ordering.
   
   To be more specifically, whether the output is deterministic depends on the 
sort algorithm, if we have stable sort where the order is preserved for same 
keys, then we have deterministic output. 


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to