From 75c79e75627bef9a2b1228a56d1cd05fd67f57a4 Mon Sep 17 00:00:00 2001 From: Charles Allen Date: Fri, 7 Nov 2014 11:01:46 -0800 Subject: [PATCH] Added comments in TopNNumericResultBuilder --- .../main/java/io/druid/query/topn/TopNNumericResultBuilder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/processing/src/main/java/io/druid/query/topn/TopNNumericResultBuilder.java b/processing/src/main/java/io/druid/query/topn/TopNNumericResultBuilder.java index ab26392b809..9c289ed3496 100644 --- a/processing/src/main/java/io/druid/query/topn/TopNNumericResultBuilder.java +++ b/processing/src/main/java/io/druid/query/topn/TopNNumericResultBuilder.java @@ -105,6 +105,7 @@ public class TopNNumericResultBuilder implements TopNResultBuilder } }; + // The logic in addEntry first adds, then removes if needed. So it can at any point have up to threshold + 1 entries. pQueue = new PriorityQueue<>(this.threshold + 1, this.dimValComparator); }