Class DoubleStatistics

java.lang.Object
org.apache.parquet.column.statistics.Statistics<Double>
org.apache.parquet.column.statistics.DoubleStatistics
Direct Known Subclasses:
IEEE754DoubleStatistics

public class DoubleStatistics extends Statistics<Double>
  • Field Details

    • max

      protected double max
    • min

      protected double min
  • Constructor Details

  • Method Details

    • updateStats

      public void updateStats(double value)
      Description copied from class: Statistics
      updates statistics min and max using the passed value
      Overrides:
      updateStats in class Statistics<Double>
      Parameters:
      value - value to use to update min and max
    • mergeStatisticsMinMax

      public void mergeStatisticsMinMax(Statistics stats)
      Description copied from class: Statistics
      Abstract method to merge this statistics min and max with the values of the parameter object. Does not do any checks, only called internally.
      Specified by:
      mergeStatisticsMinMax in class Statistics<Double>
      Parameters:
      stats - Statistics object to merge with
    • setMinMaxFromBytes

      public void setMinMaxFromBytes(byte[] minBytes, byte[] maxBytes)
      Description copied from class: Statistics
      Abstract method to set min and max values from byte arrays.
      Specified by:
      setMinMaxFromBytes in class Statistics<Double>
      Parameters:
      minBytes - byte array to set the min value to
      maxBytes - byte array to set the max value to
    • getMaxBytes

      public byte[] getMaxBytes()
      Description copied from class: Statistics
      Abstract method to return the max value as a byte array
      Specified by:
      getMaxBytes in class Statistics<Double>
      Returns:
      byte array corresponding to the max value
    • getMinBytes

      public byte[] getMinBytes()
      Description copied from class: Statistics
      Abstract method to return the min value as a byte array
      Specified by:
      getMinBytes in class Statistics<Double>
      Returns:
      byte array corresponding to the min value
    • isSmallerThan

      public boolean isSmallerThan(long size)
      Description copied from class: Statistics
      Abstract method to return whether the min and max values fit in the given size.
      Specified by:
      isSmallerThan in class Statistics<Double>
      Parameters:
      size - a size in bytes
      Returns:
      true iff the min and max values are less than size bytes
    • updateStats

      public void updateStats(double min_value, double max_value)
    • initializeStats

      public void initializeStats(double min_value, double max_value)
    • genericGetMin

      public Double genericGetMin()
      Description copied from class: Statistics
      Returns the min value in the statistics. The java natural order of the returned type defined by Comparable.compareTo(Object) might not be the proper one. For example, UINT_32 requires unsigned comparison instead of the natural signed one. Use Statistics.compareMinToValue(Comparable) or the comparator returned by Statistics.comparator() to always get the proper ordering.
      Specified by:
      genericGetMin in class Statistics<Double>
      Returns:
      the min value
    • genericGetMax

      public Double genericGetMax()
      Description copied from class: Statistics
      Returns the max value in the statistics. The java natural order of the returned type defined by Comparable.compareTo(Object) might not be the proper one. For example, UINT_32 requires unsigned comparison instead of the natural signed one. Use Statistics.compareMaxToValue(Comparable) or the comparator returned by Statistics.comparator() to always get the proper ordering.
      Specified by:
      genericGetMax in class Statistics<Double>
      Returns:
      the max value
    • compareMinToValue

      public int compareMinToValue(double value)
    • compareMaxToValue

      public int compareMaxToValue(double value)
    • getMax

      public double getMax()
    • getMin

      public double getMin()
    • setMinMax

      public void setMinMax(double min, double max)
    • copy

      public DoubleStatistics copy()
      Specified by:
      copy in class Statistics<Double>
      Returns:
      a new independent statistics instance of this class.