Druid query tasks are executed in parallel on different chunks of the data which themselves may contain rows that did not arrive in order.
The results of the distributed query are merged on the Broker - with a general assumption that it will be a much smaller data set than was originally processed - ie aggregates.
LEAD and LAG do come up a lot though - what kind of data are you dealing with?