Hi,
There is a difference in output if i set sorted=“true” vs “false” for the AGGREGATE node… so is it sorting and what is the sorting based on? it does not seem to sort in the order of the field names listed in the aggregrateKey…
Thanks,
al
Hi,
There is a difference in output if i set sorted=“true” vs “false” for the AGGREGATE node… so is it sorting and what is the sorting based on? it does not seem to sort in the order of the field names listed in the aggregrateKey…
Thanks,
al
It is not about sorting output - that is a by product.
if you set sorted=yes then it means that Aggregator assumes input to be sorted and it does not maintain any internal buffer/cache to keep semi-results. Then the output is sorted the same way as the input.
If sorted=no then input is assumed not to be sorted and Aggregator uses internal buffer to keep semi results. Results are sent out after the last records was read (as opposed to sorted mode, when result is sent out each time a group is finished - i.e. key value changes).