Module org.elasticsearch.compute
Record Class NumericTopNOperator.NumericTopNOperatorFactory
java.lang.Object
java.lang.Record
org.elasticsearch.compute.operator.topn.NumericTopNOperator.NumericTopNOperatorFactory
- All Implemented Interfaces:
Describable,Operator.OperatorFactory
- Enclosing class:
NumericTopNOperator
public static record NumericTopNOperator.NumericTopNOperatorFactory(int topCount, ElementType elementType, boolean asc, boolean nullsFirst, SharedNumericThreshold.Supplier thresholdSupplier)
extends Record
implements Operator.OperatorFactory
Factory wired in by
LocalExecutionPlanner.tryBuildNumericTopN(). Carries the topN
limit, the sort element type, and the sort order (asc/desc, nulls position) — everything
else (channel layout) is fixed by the planner's precondition check.-
Constructor Summary
ConstructorsConstructorDescriptionNumericTopNOperatorFactory(int topCount, ElementType elementType, boolean asc, boolean nullsFirst) NumericTopNOperatorFactory(int topCount, ElementType elementType, boolean asc, boolean nullsFirst, SharedNumericThreshold.Supplier thresholdSupplier) Creates an instance of aNumericTopNOperatorFactoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanasc()Returns the value of theascrecord component.describe()Returns a description of the component.Returns the value of theelementTyperecord component.final booleanIndicates whether some other object is "equal to" this one.get(DriverContext driverContext) Creates a new intermediate operator.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thenullsFirstrecord component.Returns the value of thethresholdSupplierrecord component.inttopCount()Returns the value of thetopCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NumericTopNOperatorFactory
public NumericTopNOperatorFactory(int topCount, ElementType elementType, boolean asc, boolean nullsFirst)
-
-
Method Details
-
get
Description copied from interface:Operator.OperatorFactoryCreates a new intermediate operator.- Specified by:
getin interfaceOperator.OperatorFactory
-
describe
Description copied from interface:DescribableReturns a description of the component. This description can be more specific than Object::toString.- Specified by:
describein interfaceDescribable- Returns:
- the description
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
topCount
public int topCount()Returns the value of thetopCountrecord component.- Returns:
- the value of the
topCountrecord component
-
elementType
Returns the value of theelementTyperecord component.- Returns:
- the value of the
elementTyperecord 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
-
thresholdSupplier
Returns the value of thethresholdSupplierrecord component.- Returns:
- the value of the
thresholdSupplierrecord component
-