Package org.apache.druid.segment
Interface ColumnProcessorFactory<T>
-
- All Known Implementing Classes:
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 byColumnProcessors.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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ColumnType
defaultType()
This default type will be used when the underlying column has an unknown type.T
makeArrayProcessor(BaseObjectColumnValueSelector<?> selector, ColumnCapabilities columnCapabilities)
T
makeComplexProcessor(BaseObjectColumnValueSelector<?> selector)
Create a processor for a complex column.T
makeDimensionProcessor(DimensionSelector selector, boolean multiValue)
Create a processor for a string column.T
makeDoubleProcessor(BaseDoubleColumnValueSelector selector)
Create a processor for a double column.T
makeFloatProcessor(BaseFloatColumnValueSelector selector)
Create a processor for a float column.T
makeLongProcessor(BaseLongColumnValueSelector selector)
Create a processor for a long column.
-
-
-
Method Detail
-
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 selectormultiValue
- 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 selectorcolumnCapabilities
- 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
-
-