The topic of sequencing to achieve things like deterministic output of head/tail type operations has come up a few times. I went ahead and drew up a proposal for adding these concepts into the exec plan via a batch index. It was just going to be an email but it got a bit long so I put it in a Google doc. I've heard different opinions on the topic so I thought it might be good to gather some consensus / make sure I'm not crazy before embarking on any actual work.
Also, I'm not sure what DataFusion has in place, so I'd welcome any thoughts there too. Proposal: https://docs.google.com/document/d/1MfVE9td9D4n5y-PTn66kk4-9xG7feXs1zSFf-qxQgPs/edit?usp=sharing