metamx/druid — pull request #817 by drcrallen (2014-10-31 00:40:53+00:00)
Title: Change data storage type in TopNNumericResultBuilder.

* Use PriorityQueue to store
* Checks to see if should even bother adding to Queue before adding.
* Re-orders Queue on build() call.
* Ideally the order would be directly preserved on build(), but this is a close second.