Hello everybody, I am creating a custom aggregator...
# troubleshooting
d
Hello everybody, I am creating a custom aggregator, at the moment i am trying to optimize it before deploy. I have a question about segments. I read that segments are like partitions of the table, thay are processed in parallel by Pinot. I have a question about sorting, i know that talking about sorting in a parallel execution is pretty silly, the execution of each segment will take different time so it is not possible to understand in advance the order, ok, but.. if i end my query with
ORDER BY id ASC
(where id is an Integer). Are the documents inside each partition/segment sorted before the aggregation (lets suppose before processing the MAX() aggregator)? or the sorting will be done at the end? I am asking that because, obviously, the order matter in my case...if each segment is ordered i can optimize my aggregator much more. I know that i can use a timestamp like recommended by @Kishore G to understand the "order" of each document but if the documents coming in an "random" order i must deal with that and this means...more code, more checks = slower.