Record Class ApproximationSettings
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.approximation.ApproximationSettings
- Record Components:
rows- The number of rows used for query approximation. Ifnull, the default will be used.confidenceLevel- The confidence level of the confidence intervals returned by query approximation. Ifnull, the default will be used.
- All Implemented Interfaces:
Writeable
public record ApproximationSettings(Integer rows, Double confidenceLevel)
extends Record
implements Writeable
Settings for query approximation.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ApproximationSettingsDefault approximation settings, when it's enabled but no specific settings are provided.static final ApproximationSettingsSentinel approximation settings representing an explicit NULL, meaning "revert to null" during merge. -
Constructor Summary
ConstructorsConstructorDescriptionApproximationSettings(Integer rows, Double confidenceLevel) Creates an instance of aApproximationSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the request confidence level.final booleanIndicates whether some other object is "equal to" this one.static ApproximationSettingsfromXContent(org.elasticsearch.xcontent.XContentParser parser) final inthashCode()Returns a hash code value for this object.static ApproximationSettingsparse(Expression expression) rows()Returns the number of rows to be used for query approximation.final StringtoString()Returns a string representation of this record class.voidwriteTo(StreamOutput out)
-
Field Details
-
DEFAULT
Default approximation settings, when it's enabled but no specific settings are provided. -
EXPLICIT_NULL
Sentinel approximation settings representing an explicit NULL, meaning "revert to null" during merge.
-
-
Constructor Details
-
ApproximationSettings
- Throws:
IOException
-
ApproximationSettings
Creates an instance of aApproximationSettingsrecord class.- Parameters:
rows- the value for therowsrecord componentconfidenceLevel- the value for theconfidenceLevelrecord component
-
-
Method Details
-
rows
Returns the number of rows to be used for query approximation. If null, the framework tries to pick a suitable number for the query. -
confidenceLevel
Returns the request confidence level. If none is set, the default level is returned. If null is explicitly set, no confidence intervals should be computed. -
fromXContent
public static ApproximationSettings fromXContent(org.elasticsearch.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
parse
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
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 withObjects::equals(Object,Object).
-