java.lang.Object
org.elasticsearch.compute.data.TDigestHolder
- All Implemented Interfaces:
GenericNamedWriteable,NamedWriteable,VersionedNamedWriteable,Writeable
This exists to hold the values from a
TDigestBlock. It is roughly parallel to
TDigestState in classic aggregations, which we are not using directly because
the serialization format is pretty bad for ESQL's use case (specifically, encoding the near-constant compression and merge strategy
data inline as opposed to in a dedicated column isn't great).
This is writable to support ESQL literals of this type, even though those should not exist. Literal support, and thus a writeable
object here, are required for ESQL testing. See for example ShowExecSerializationTest.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTDigestHolder(List<Double> centroids, List<Long> counts, double min, double max, double sum, long valueCount) TDigestHolder(org.apache.lucene.util.BytesRef encodedDigest, double min, double max, double sum, long valueCount) TDigestHolder(TDigestState rawTDigest, double min, double max, double sum, long valueCount) TDigestHolder(org.elasticsearch.tdigest.parsing.TDigestParser.ParsedTDigest parsed) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTo(TDigestState state) static TDigestHolderempty()booleanorg.apache.lucene.util.BytesRefdoublegetMax()doublegetMin()doublegetSum()longinthashCode()toString()voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.io.stream.VersionedNamedWriteable
supportsVersion
-
Field Details
-
ENTRY
-
-
Constructor Details
-
TDigestHolder
public TDigestHolder(org.apache.lucene.util.BytesRef encodedDigest, double min, double max, double sum, long valueCount) -
TDigestHolder
-
TDigestHolder
public TDigestHolder(org.elasticsearch.tdigest.parsing.TDigestParser.ParsedTDigest parsed) throws IOException - Throws:
IOException
-
TDigestHolder
public TDigestHolder(List<Double> centroids, List<Long> counts, double min, double max, double sum, long valueCount) throws IOException - Throws:
IOException
-
TDigestHolder
- Throws:
IOException
-
-
Method Details
-
empty
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
addTo
-
getEncodedDigest
public org.apache.lucene.util.BytesRef getEncodedDigest() -
getMax
public double getMax() -
getMin
public double getMin() -
getSum
public double getSum() -
getValueCount
public long getValueCount() -
toString
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable- Specified by:
getWriteableNamein interfaceVersionedNamedWriteable
-
getMinimalSupportedVersion
- Specified by:
getMinimalSupportedVersionin interfaceVersionedNamedWriteable
-