Class AbstractMergedStatistic

java.lang.Object
org.apache.drill.exec.physical.impl.statistics.AbstractMergedStatistic
All Implemented Interfaces:
MergedStatistic, Statistic
Direct Known Subclasses:
AvgWidthMergedStatistic, CntDupsMergedStatistic, ColTypeMergedStatistic, ColumnMergedStatistic, HLLMergedStatistic, NDVMergedStatistic, NNRowCountMergedStatistic, RowCountMergedStatistic, TDigestMergedStatistic

public abstract class AbstractMergedStatistic extends Object implements MergedStatistic, Statistic
  • Field Details

    • name

      protected String name
    • inputName

      protected String inputName
    • samplePercent

      protected double samplePercent
    • state

      protected Statistic.State state
  • Constructor Details

    • AbstractMergedStatistic

      public AbstractMergedStatistic()
  • Method Details

    • initialize

      public void initialize(String name, String inputName, double samplePercent)
    • initialize

      public abstract void initialize(String inputName, double samplePercent)
      Description copied from interface: MergedStatistic
      Initialize the merged statistic
      Specified by:
      initialize in interface MergedStatistic
      Parameters:
      inputName - - the input StatisticsAggBatch statistic for this merged statistic
      samplePercent - - the sample percentage used for extrapolation post merge phase
    • getName

      public abstract String getName()
      Description copied from interface: MergedStatistic
      Gets the name of the merged statistic
      Specified by:
      getName in interface MergedStatistic
      Returns:
      - name of this merged statistic
    • getInput

      public abstract String getInput()
      Description copied from interface: MergedStatistic
      Gets the name of the input statistic
      Specified by:
      getInput in interface MergedStatistic
      Returns:
      - name of the input StatisticsAggBatch statistic for this merged statistic
    • merge

      public abstract void merge(MapVector input)
      Description copied from interface: MergedStatistic
      Merges the input statistic (incoming value vector) into the existing merged statistic
      Specified by:
      merge in interface MergedStatistic
      Parameters:
      input - - the input value vector to merge
    • setOutput

      public abstract void setOutput(MapVector output)
      Description copied from interface: MergedStatistic
      Sets the merged statistic value in the output (outgoing value vector)
      Specified by:
      setOutput in interface MergedStatistic
      Parameters:
      output - - the output vector where to populate the statistic value