Module org.elasticsearch.compute
Record Class BlockHash.TopNDef
java.lang.Object
java.lang.Record
org.elasticsearch.compute.aggregation.blockhash.BlockHash.TopNDef
- Record Components:
order- The order of this group in the sort, starting at 0asc- True if this group will be sorted ascending. False if descending.nullsFirst- True if the nulls should be the first elements in the TopN. False if they should be kept last.limit- The number of elements to keep, including nulls.
- Enclosing class:
BlockHash
public static record BlockHash.TopNDef(int order, boolean asc, boolean nullsFirst, int limit)
extends Record
Configuration for a BlockHash group spec that is later sorted and limited (Top-N).
Part of a performance improvement to avoid aggregating groups that will not be used.
-
Constructor Summary
ConstructorsConstructorDescriptionTopNDef(int order, boolean asc, boolean nullsFirst, int limit) Creates an instance of aTopNDefrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanasc()Returns the value of theascrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intlimit()Returns the value of thelimitrecord component.booleanReturns the value of thenullsFirstrecord component.intorder()Returns the value of theorderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TopNDef
public TopNDef(int order, boolean asc, boolean nullsFirst, int limit) Creates an instance of aTopNDefrecord class.- Parameters:
order- the value for theorderrecord componentasc- the value for theascrecord componentnullsFirst- the value for thenullsFirstrecord componentlimit- the value for thelimitrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
order
public int order()Returns the value of theorderrecord component.- Returns:
- the value of the
orderrecord component
-
asc
public boolean asc()Returns the value of theascrecord component.- Returns:
- the value of the
ascrecord component
-
nullsFirst
public boolean nullsFirst()Returns the value of thenullsFirstrecord component.- Returns:
- the value of the
nullsFirstrecord component
-
limit
public int limit()Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-