Class DictionaryBuildingGroupByColumnSelectorStrategy.UniValueDimensionIdCodec

java.lang.Object
org.apache.druid.query.groupby.epinephelinae.column.DictionaryBuildingGroupByColumnSelectorStrategy.UniValueDimensionIdCodec
All Implemented Interfaces:
DimensionIdCodec<Object>
Enclosing class:
DictionaryBuildingGroupByColumnSelectorStrategy<DimensionType>

public static class DictionaryBuildingGroupByColumnSelectorStrategy.UniValueDimensionIdCodec extends Object implements DimensionIdCodec<Object>
  • Constructor Details

    • UniValueDimensionIdCodec

      public UniValueDimensionIdCodec(NullableTypeStrategy nullableTypeStrategy)
  • Method Details

    • lookupId

      public MemoryFootprint<Integer> lookupId(Object dimension)
      Specified by:
      lookupId in interface DimensionIdCodec<Object>
      Returns:
      DictionaryId of the object at the given index and the memory increase associated with it
    • idToKey

      public Object idToKey(int id)
      Specified by:
      idToKey in interface DimensionIdCodec<Object>
    • canCompareIds

      public boolean canCompareIds()
      Description copied from interface: DimensionIdCodec
      Returns if the object comparison can be optimised directly by comparing the dictionaryIds, instead of decoding the objects and comparing those. Therefore, it returns true iff the "dict" function defined by dict(id) = value is monotonically increasing. Ids backed by dictionaries built on the fly can never be compared, therefore those should always return false.
      Specified by:
      canCompareIds in interface DimensionIdCodec<Object>
    • reset

      public void reset()
      Specified by:
      reset in interface DimensionIdCodec<Object>