Interface ColumnProcessorFactory<T>

All Known Implementing Classes:
EqualityFilter.TypedConstantValueMatcherFactory, PredicateValueMatcherFactory, StringConstantValueMatcherFactory

public interface ColumnProcessorFactory<T>
Class that encapsulates knowledge about how to create "column processors", which are... objects that process columns and want to have type-specific logic. Used by ColumnProcessors.makeProcessor(java.lang.String, org.apache.druid.segment.ColumnProcessorFactory<T>, org.apache.druid.segment.ColumnSelectorFactory). Column processors can be any type "T". The idea is that a ColumnProcessorFactory embodies the logic for wrapping and processing selectors of various types, and so enables nice code design, where type-dependent code is not sprinkled throughout.
See Also:
  • Method Details

    • defaultType

      ColumnType defaultType()
      This default type will be used when the underlying column has an unknown type. This allows a column processor factory to specify what type it prefers to deal with (the most 'natural' type for whatever it is doing) when all else is equal.
    • makeDimensionProcessor

      T makeDimensionProcessor(DimensionSelector selector, boolean multiValue)
      Create a processor for a string column.
      Parameters:
      selector - dimension selector
      multiValue - whether the selector *might* have multiple values
    • makeFloatProcessor

      T makeFloatProcessor(BaseFloatColumnValueSelector selector)
      Create a processor for a float column.
      Parameters:
      selector - float selector
    • makeDoubleProcessor

      T makeDoubleProcessor(BaseDoubleColumnValueSelector selector)
      Create a processor for a double column.
      Parameters:
      selector - double selector
    • makeLongProcessor

      T makeLongProcessor(BaseLongColumnValueSelector selector)
      Create a processor for a long column.
      Parameters:
      selector - long selector
    • makeArrayProcessor

      T makeArrayProcessor(BaseObjectColumnValueSelector<?> selector, @Nullable ColumnCapabilities columnCapabilities)
      Parameters:
      selector - array selector
      columnCapabilities - information about the underlying column to match. Null here just means the capabilities are unknown, and not necessarily indicative that the column doesn't exist
    • makeComplexProcessor

      T makeComplexProcessor(BaseObjectColumnValueSelector<?> selector)
      Create a processor for a complex column.
      Parameters:
      selector - object selector