Package org.apache.druid.segment
Class QueryableIndexColumnSelectorFactory
- java.lang.Object
-
- org.apache.druid.segment.QueryableIndexColumnSelectorFactory
-
- All Implemented Interfaces:
Expr.InputBindingInspector
,ColumnInspector
,ColumnSelectorFactory
,RowIdSupplier
public class QueryableIndexColumnSelectorFactory extends Object implements ColumnSelectorFactory, RowIdSupplier
The basic implementation ofColumnSelectorFactory
over a historical segment (i. e.QueryableIndex
). It's counterpart for incremental index isIncrementalIndexColumnSelectorFactory
.
-
-
Field Summary
Fields Modifier and Type Field Description protected ReadableOffset
offset
-
Fields inherited from interface org.apache.druid.segment.RowIdSupplier
INIT
-
-
Constructor Summary
Constructors Constructor Description QueryableIndexColumnSelectorFactory(VirtualColumns virtualColumns, boolean descending, ReadableOffset offset, ColumnCache columnCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnCapabilities
getColumnCapabilities(String columnName)
Returns capabilities of a particular column, if known.long
getRowId()
Returns a number that uniquely identifies the current position of some underlying cursor.RowIdSupplier
getRowIdSupplier()
Returns aRowIdSupplier
that allows callers to detect whether the selectors returned by this factory have moved or not.ColumnValueSelector<?>
makeColumnValueSelector(String columnName)
Returns ColumnValueSelector corresponding to the given column name, orNilColumnValueSelector
if the column with such name is absent.DimensionSelector
makeDimensionSelector(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
getColumnCapabilitiesWithDefault, getType
-
Methods inherited from interface org.apache.druid.math.expr.Expr.InputBindingInspector
areNumeric, areNumeric, areSameTypes, areSameTypes, areScalar, areScalar, canVectorize, canVectorize
-
-
-
-
Field Detail
-
offset
protected final ReadableOffset offset
-
-
Constructor Detail
-
QueryableIndexColumnSelectorFactory
public QueryableIndexColumnSelectorFactory(VirtualColumns virtualColumns, boolean descending, ReadableOffset offset, ColumnCache columnCache)
-
-
Method Detail
-
makeDimensionSelector
public DimensionSelector makeDimensionSelector(DimensionSpec dimensionSpec)
- Specified by:
makeDimensionSelector
in interfaceColumnSelectorFactory
-
makeColumnValueSelector
public ColumnValueSelector<?> makeColumnValueSelector(String columnName)
Description copied from interface:ColumnSelectorFactory
Returns ColumnValueSelector corresponding to the given column name, orNilColumnValueSelector
if the column with such name is absent.- Specified by:
makeColumnValueSelector
in interfaceColumnSelectorFactory
-
getRowIdSupplier
@Nullable public RowIdSupplier getRowIdSupplier()
Description copied from interface:ColumnSelectorFactory
Returns aRowIdSupplier
that 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:
getRowIdSupplier
in interfaceColumnSelectorFactory
-
getRowId
public long getRowId()
Description copied from interface:RowIdSupplier
Returns 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:
getRowId
in interfaceRowIdSupplier
-
getColumnCapabilities
@Nullable public ColumnCapabilities getColumnCapabilities(String columnName)
Description copied from interface:ColumnSelectorFactory
Returns 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:
getColumnCapabilities
in interfaceColumnInspector
- Specified by:
getColumnCapabilities
in interfaceColumnSelectorFactory
- Parameters:
columnName
- column name- Returns:
- capabilities, or null
-
-