Interface Aggregator

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void aggregate()
      Performs aggregation.
      default long aggregateWithSize()
      Performs aggregation and returns the increase in required on-heap memory caused by this aggregation step.
      void close()  
      Object get()  
      default double getDouble()
      The default implementation casts getFloat() to double.
      float getFloat()  
      long getLong()  
      default boolean isNull()
      returns true if aggregator's output type is primitive long/double/float and aggregated value is null, but when aggregated output type is Object, this method always returns false, and users are advised to check nullability for the object returned by get() method.
    • Method Detail

      • aggregate

        void aggregate()
        Performs aggregation.
      • aggregateWithSize

        default long aggregateWithSize()
        Performs aggregation and returns the increase in required on-heap memory caused by this aggregation step.

        The default implementation of this method calls aggregate() and returns 0.

        If overridden, this method must include the JVM object overheads in the size estimation and must ensure not to underestimate required memory as that might lead to OOM errors.

        Returns:
        Increase in required on-heap memory caused by this aggregation step.
      • getFloat

        float getFloat()
      • getLong

        long getLong()
      • getDouble

        default double getDouble()
        The default implementation casts getFloat() to double. This default method is added to enable smooth backward compatibility, please re-implement it if your aggregators work with numeric double columns.
      • isNull

        default boolean isNull()
        returns true if aggregator's output type is primitive long/double/float and aggregated value is null, but when aggregated output type is Object, this method always returns false, and users are advised to check nullability for the object returned by get() method. The default implementation always return false to enable smooth backward compatibility, re-implement if your aggregator is nullable.