Class LongBucketedSort

java.lang.Object
org.elasticsearch.compute.data.sort.LongBucketedSort
All Implemented Interfaces:
Closeable, AutoCloseable, org.elasticsearch.core.Releasable

public class LongBucketedSort extends Object implements org.elasticsearch.core.Releasable
Aggregates the top N long values per bucket. See BucketedSort for more information. This class is generated. Edit @{code X-BucketedSort.java.st} instead of this file.
  • Constructor Details

    • LongBucketedSort

      public LongBucketedSort(BigArrays bigArrays, SortOrder order, int bucketSize)
  • Method Details

    • collect

      public void collect(long value, int bucket)
      Collects a value into a bucket.

      It may or may not be inserted in the heap, depending on if it is better than the current root.

    • getOrder

      public SortOrder getOrder()
      The order of the sort.
    • getBucketSize

      public int getBucketSize()
      The number of values to store per bucket.
    • merge

      public void merge(int groupId, LongBucketedSort other, int otherGroupId)
      Merge the values from other's otherGroupId into groupId.
    • toBlock

      public Block toBlock(BlockFactory blockFactory, IntVector selected)
      Creates a block with the values from the selected groups.
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.elasticsearch.core.Releasable