Package org.apache.druid.frame.processor
Class MultiColumnSelectorFactory
- java.lang.Object
-
- org.apache.druid.frame.processor.MultiColumnSelectorFactory
-
- All Implemented Interfaces:
Expr.InputBindingInspector,ColumnInspector,ColumnSelectorFactory
public class MultiColumnSelectorFactory extends Object implements ColumnSelectorFactory
AColumnSelectorFactorythat wraps multipleColumnSelectorFactoryand delegates to one of them at any given time. The identity of the delegated-to factory is changed by callingsetCurrentFactory(int).
-
-
Constructor Summary
Constructors Constructor Description MultiColumnSelectorFactory(List<Supplier<ColumnSelectorFactory>> factorySuppliers, RowSignature signature)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnCapabilitiesgetColumnCapabilities(String column)Returns capabilities of a particular column, if known.ColumnValueSelectormakeColumnValueSelector(String columnName)Returns ColumnValueSelector corresponding to the given column name, orNilColumnValueSelectorif the column with such name is absent.DimensionSelectormakeDimensionSelector(DimensionSpec dimensionSpec)voidsetCurrentFactory(int currentFactory)MultiColumnSelectorFactorywithRowMemoryAndSignatureColumns()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, wait
-
Methods inherited from interface org.apache.druid.segment.ColumnInspector
getType
-
Methods inherited from interface org.apache.druid.segment.ColumnSelectorFactory
getRowIdSupplier
-
Methods inherited from interface org.apache.druid.math.expr.Expr.InputBindingInspector
areNumeric, areNumeric, areSameTypes, areSameTypes, areScalar, areScalar, canVectorize, canVectorize
-
-
-
-
Constructor Detail
-
MultiColumnSelectorFactory
public MultiColumnSelectorFactory(List<Supplier<ColumnSelectorFactory>> factorySuppliers, RowSignature signature)
-
-
Method Detail
-
setCurrentFactory
public void setCurrentFactory(int currentFactory)
-
withRowMemoryAndSignatureColumns
public MultiColumnSelectorFactory 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
public DimensionSelector makeDimensionSelector(DimensionSpec dimensionSpec)
- Specified by:
makeDimensionSelectorin interfaceColumnSelectorFactory
-
makeColumnValueSelector
public ColumnValueSelector makeColumnValueSelector(String columnName)
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
@Nullable public ColumnCapabilities getColumnCapabilities(String column)
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
-
-