Class FrameColumnSelectorFactory
- java.lang.Object
-
- org.apache.druid.frame.segment.row.FrameColumnSelectorFactory
-
- All Implemented Interfaces:
Expr.InputBindingInspector,ColumnInspector,ColumnSelectorFactory,RowIdSupplier
public class FrameColumnSelectorFactory extends Object implements ColumnSelectorFactory, RowIdSupplier
-
-
Field Summary
Fields Modifier and Type Field Description static StringROW_MEMORY_COLUMNName of the virtual column that containsMemoryRangefor direct access to row memory.static StringROW_SIGNATURE_COLUMNName of the virtual column that contains theRowSignatureof frames from thisColumnSelectorFactory.-
Fields inherited from interface org.apache.druid.segment.RowIdSupplier
INIT
-
-
Constructor Summary
Constructors Constructor Description FrameColumnSelectorFactory(Frame frame, RowSignature frameSignature, List<FieldReader> fieldReaders, ReadableFrameRowPointer rowPointer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnCapabilitiesgetColumnCapabilities(String column)Returns capabilities of a particular column, if known.longgetRowId()Returns a number that uniquely identifies the current position of some underlying cursor.RowIdSuppliergetRowIdSupplier()Returns aRowIdSupplierthat allows callers to detect whether the selectors returned by this factory have moved or not.ColumnValueSelectormakeColumnValueSelector(String columnName)Returns ColumnValueSelector corresponding to the given column name, orNilColumnValueSelectorif the column with such name is absent.DimensionSelectormakeDimensionSelector(DimensionSpec dimensionSpec)-
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.math.expr.Expr.InputBindingInspector
areNumeric, areNumeric, areSameTypes, areSameTypes, areScalar, areScalar, canVectorize, canVectorize
-
-
-
-
Field Detail
-
ROW_SIGNATURE_COLUMN
public static final String ROW_SIGNATURE_COLUMN
Name of the virtual column that contains theRowSignatureof frames from thisColumnSelectorFactory. This is necessary because callers need it to verify thatROW_MEMORY_COLUMNis usable, but the interface does not provide a natural way to retrieve the underlying signature. Guaranteed not to appear in the frame itself due toFrameWriterUtils.findDisallowedFieldNames(org.apache.druid.segment.column.RowSignature)checks.- See Also:
- Constant Field Values
-
ROW_MEMORY_COLUMN
public static final String ROW_MEMORY_COLUMN
Name of the virtual column that containsMemoryRangefor direct access to row memory. Guaranteed not to appear in the frame itself due toFrameWriterUtils.findDisallowedFieldNames(org.apache.druid.segment.column.RowSignature)checks.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FrameColumnSelectorFactory
public FrameColumnSelectorFactory(Frame frame, RowSignature frameSignature, List<FieldReader> fieldReaders, ReadableFrameRowPointer rowPointer)
-
-
Method Detail
-
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
-
getRowIdSupplier
@Nullable public RowIdSupplier getRowIdSupplier()
Description copied from interface:ColumnSelectorFactoryReturns aRowIdSupplierthat allows callers to detect whether the selectors returned by this factory have moved or not. Useful for selectors that wrap other selectors, such as virtual columns, as it allows them to cache their outputs.- Specified by:
getRowIdSupplierin interfaceColumnSelectorFactory
-
getRowId
public long getRowId()
Description copied from interface:RowIdSupplierReturns a number that uniquely identifies the current position of some underlying cursor. This is useful for caching: it is safe to assume nothing has changed in the selector as long as the row ID stays the same. Row IDs do not need to be contiguous or monotonic. They need not have any meaning. In particular: they may not be row *numbers* (row number 0 may have any arbitrary row ID). Valid row IDs are always nonnegative.- Specified by:
getRowIdin interfaceRowIdSupplier
-
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
-
-