Class IntegerTupleSketchValueAggregator

  • All Implemented Interfaces:
    ValueAggregator<byte[],​org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary>>

    public class IntegerTupleSketchValueAggregator
    extends Object
    implements ValueAggregator<byte[],​org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary>>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> applyAggregatedValue​(org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> value, org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> aggregatedValue)
      Applies an aggregated value to the current aggregated value.
      org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> applyRawValue​(org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> value, byte[] rawValue)
      Applies a raw value to the current aggregated value.
      org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> cloneAggregatedValue​(org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> value)
      Clones an aggregated value.
      org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> deserializeAggregatedValue​(byte[] bytes)
      De-serializes an aggregated value from a byte array.
      FieldSpec.DataType getAggregatedValueType()
      Returns the data type of the aggregated value.
      AggregationFunctionType getAggregationType()
      Returns the type of the aggregation.
      org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> getInitialAggregatedValue​(byte[] rawValue)
      Returns the initial aggregated value.
      int getMaxAggregatedValueByteSize()
      Returns the maximum size in bytes of the aggregated values seen so far.
      byte[] serializeAggregatedValue​(org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> value)
      Serializes an aggregated value into a byte array.
    • Constructor Detail

      • IntegerTupleSketchValueAggregator

        public IntegerTupleSketchValueAggregator​(org.apache.datasketches.tuple.aninteger.IntegerSummary.Mode mode)
    • Method Detail

      • getInitialAggregatedValue

        public org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> getInitialAggregatedValue​(byte[] rawValue)
        Description copied from interface: ValueAggregator
        Returns the initial aggregated value.
        Specified by:
        getInitialAggregatedValue in interface ValueAggregator<byte[],​org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary>>
      • applyRawValue

        public org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> applyRawValue​(org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> value,
                                                                                                                          byte[] rawValue)
        Description copied from interface: ValueAggregator
        Applies a raw value to the current aggregated value.

        NOTE: if value is mutable, will directly modify the value.

        Specified by:
        applyRawValue in interface ValueAggregator<byte[],​org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary>>
      • applyAggregatedValue

        public org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> applyAggregatedValue​(org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> value,
                                                                                                                                 org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> aggregatedValue)
        Description copied from interface: ValueAggregator
        Applies an aggregated value to the current aggregated value.

        NOTE: if value is mutable, will directly modify the value.

        Specified by:
        applyAggregatedValue in interface ValueAggregator<byte[],​org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary>>
      • cloneAggregatedValue

        public org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> cloneAggregatedValue​(org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> value)
        Description copied from interface: ValueAggregator
        Clones an aggregated value.
        Specified by:
        cloneAggregatedValue in interface ValueAggregator<byte[],​org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary>>
      • getMaxAggregatedValueByteSize

        public int getMaxAggregatedValueByteSize()
        Description copied from interface: ValueAggregator
        Returns the maximum size in bytes of the aggregated values seen so far.
        Specified by:
        getMaxAggregatedValueByteSize in interface ValueAggregator<byte[],​org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary>>
      • serializeAggregatedValue

        public byte[] serializeAggregatedValue​(org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> value)
        Description copied from interface: ValueAggregator
        Serializes an aggregated value into a byte array.
        Specified by:
        serializeAggregatedValue in interface ValueAggregator<byte[],​org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary>>
      • deserializeAggregatedValue

        public org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary> deserializeAggregatedValue​(byte[] bytes)
        Description copied from interface: ValueAggregator
        De-serializes an aggregated value from a byte array.
        Specified by:
        deserializeAggregatedValue in interface ValueAggregator<byte[],​org.apache.datasketches.tuple.Sketch<org.apache.datasketches.tuple.aninteger.IntegerSummary>>