Package org.apache.druid.frame.processor
Class MultiColumnSelectorFactory
java.lang.Object
org.apache.druid.frame.processor.MultiColumnSelectorFactory
- All Implemented Interfaces:
Expr.InputBindingInspector,ColumnInspector,ColumnSelectorFactory
A
ColumnSelectorFactory that wraps multiple ColumnSelectorFactory and delegates to one of
them at any given time. The identity of the delegated-to factory is changed by calling setCurrentFactory(int).-
Constructor Summary
ConstructorsConstructorDescriptionMultiColumnSelectorFactory(List<Supplier<ColumnSelectorFactory>> factorySuppliers, RowSignature signature) -
Method Summary
Modifier and TypeMethodDescriptiongetColumnCapabilities(String column) Returns capabilities of a particular column, if known.makeColumnValueSelector(String columnName) Returns ColumnValueSelector corresponding to the given column name, orNilColumnValueSelectorif the column with such name is absent.makeDimensionSelector(DimensionSpec dimensionSpec) voidsetCurrentFactory(int currentFactory) Create a copy that includesFrameColumnSelectorFactory.ROW_SIGNATURE_COLUMNandFrameColumnSelectorFactory.ROW_MEMORY_COLUMNto potentially enable direct row memory copying.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.segment.ColumnInspector
getTypeMethods inherited from interface org.apache.druid.segment.ColumnSelectorFactory
getRowIdSupplierMethods inherited from interface org.apache.druid.math.expr.Expr.InputBindingInspector
areNumeric, areNumeric, areSameTypes, areSameTypes, areScalar, areScalar, canVectorize, canVectorize
-
Constructor Details
-
MultiColumnSelectorFactory
public MultiColumnSelectorFactory(List<Supplier<ColumnSelectorFactory>> factorySuppliers, RowSignature signature)
-
-
Method Details
-
setCurrentFactory
public void setCurrentFactory(int currentFactory) -
withRowMemoryAndSignatureColumns
Create a copy that includesFrameColumnSelectorFactory.ROW_SIGNATURE_COLUMNandFrameColumnSelectorFactory.ROW_MEMORY_COLUMNto potentially enable direct row memory copying. If these columns don't actually exist in the underlying column selector factories, they'll be ignored, so it's OK to use this method even if the columns may not exist. -
makeDimensionSelector
- Specified by:
makeDimensionSelectorin interfaceColumnSelectorFactory
-
makeColumnValueSelector
Description copied from interface:ColumnSelectorFactoryReturns ColumnValueSelector corresponding to the given column name, orNilColumnValueSelectorif the column with such name is absent.- Specified by:
makeColumnValueSelectorin interfaceColumnSelectorFactory
-
getColumnCapabilities
Description copied from interface:ColumnSelectorFactoryReturns capabilities of a particular column, if known. May be null if the column doesn't exist, or if the column does exist but the capabilities are unknown. The latter is possible with dynamically discovered columns.- Specified by:
getColumnCapabilitiesin interfaceColumnInspector- Specified by:
getColumnCapabilitiesin interfaceColumnSelectorFactory- Parameters:
column- column name- Returns:
- capabilities, or null
-