Class ValueStore

java.lang.Object
io.trino.operator.aggregation.histogram.ValueStore

public class ValueStore extends Object
helper class for GroupedTypedHistogram May be used for other cases that need a simple hash for values

sort of a FlyWeightStore for values--will return unique number for a value. If it exists, you'll get the same number. Class map Value -> number

Note it assumes you're storing # -> Value (Type, Block, position, or the result of the ) somewhere else

  • Constructor Details

  • Method Details

    • addAndGetPosition

      public int addAndGetPosition(Block block, int position, long valueHash)
      This will add an item if not already in the system. It returns a pointer that is unique for multiple instances of the value. If item present, returns the pointer into the system
    • getRehashCount

      public int getRehashCount()
    • getEstimatedSize

      public long getEstimatedSize()