public class QueryableIndexVectorColumnSelectorFactory extends Object implements VectorColumnSelectorFactory
| Constructor and Description |
|---|
QueryableIndexVectorColumnSelectorFactory(QueryableIndex index,
ReadableVectorOffset offset,
Closer closer,
Map<String,BaseColumn> columnCache,
VirtualColumns virtualColumns) |
| Modifier and Type | Method and Description |
|---|---|
ColumnCapabilities |
getColumnCapabilities(String columnName)
Returns capabilities of a particular column, or null if the column doesn't exist.
|
ReadableVectorInspector |
getReadableVectorInspector()
Returns a
ReadableVectorInspector for the VectorCursor that generated this object. |
MultiValueDimensionVectorSelector |
makeMultiValueDimensionSelector(DimensionSpec dimensionSpec)
Returns a dictionary encoded, string-typed, multi-value-per-row column selector.
|
VectorObjectSelector |
makeObjectSelector(String columnName)
Returns an object selector.
|
SingleValueDimensionVectorSelector |
makeSingleValueDimensionSelector(DimensionSpec dimensionSpec)
Returns a dictionary encoded, string-typed, single-value-per-row column selector.
|
VectorValueSelector |
makeValueSelector(String columnName)
Returns a primitive column selector.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMaxVectorSizegetTypeareNumeric, areNumeric, areScalar, areScalar, canVectorize, canVectorizepublic QueryableIndexVectorColumnSelectorFactory(QueryableIndex index, ReadableVectorOffset offset, Closer closer, Map<String,BaseColumn> columnCache, VirtualColumns virtualColumns)
public ReadableVectorInspector getReadableVectorInspector()
VectorColumnSelectorFactoryReadableVectorInspector for the VectorCursor that generated this object.getReadableVectorInspector in interface VectorColumnSelectorFactorypublic MultiValueDimensionVectorSelector makeMultiValueDimensionSelector(DimensionSpec dimensionSpec)
VectorColumnSelectorFactoryVectorColumnSelectorFactory.getColumnCapabilities(java.lang.String) indicates they return STRING. Unlike
VectorColumnSelectorFactory.makeSingleValueDimensionSelector(org.apache.druid.query.dimension.DimensionSpec), this should not be called on nonexistent columns.
If you need to write code that adapts to different input types, you should write a
VectorColumnProcessorFactory and use one of the
ColumnProcessors.makeVectorProcessor(java.lang.String, org.apache.druid.segment.VectorColumnProcessorFactory<T>, org.apache.druid.segment.vector.VectorColumnSelectorFactory) functions instead of using this method.makeMultiValueDimensionSelector in interface VectorColumnSelectorFactorypublic SingleValueDimensionVectorSelector makeSingleValueDimensionSelector(DimensionSpec dimensionSpec)
VectorColumnSelectorFactoryVectorColumnSelectorFactory.getColumnCapabilities(java.lang.String) indicates they return STRING, or on nonexistent columns. Since the selector
created with this method operates directly on the dictionary encoded input, STRING values must be translated from
the dictionary id for a given row value using DimensionDictionarySelector.lookupName(int), but
this selector can prove optimal for operations which can be done directly on the underlying dictionary ids, such
as grouping within a segment.
If you need to write code that adapts to different input types, you should write a
VectorColumnProcessorFactory and use one of the
ColumnProcessors.makeVectorProcessor(java.lang.String, org.apache.druid.segment.VectorColumnProcessorFactory<T>, org.apache.druid.segment.vector.VectorColumnSelectorFactory) functions instead of using this method.makeSingleValueDimensionSelector in interface VectorColumnSelectorFactorypublic VectorValueSelector makeValueSelector(String columnName)
VectorColumnSelectorFactoryVectorColumnSelectorFactory.getColumnCapabilities(java.lang.String)
indicates they return DOUBLE, FLOAT, or LONG, or on nonexistent columns.
If you need to write code that adapts to different input types, you should write a
VectorColumnProcessorFactory and use one of the
ColumnProcessors.makeVectorProcessor(java.lang.String, org.apache.druid.segment.VectorColumnProcessorFactory<T>, org.apache.druid.segment.vector.VectorColumnSelectorFactory) functions instead of using this method.makeValueSelector in interface VectorColumnSelectorFactorypublic VectorObjectSelector makeObjectSelector(String columnName)
VectorColumnSelectorFactoryVectorColumnSelectorFactory.getColumnCapabilities(java.lang.String) indicates that
they return STRING or COMPLEX, or on nonexistent columns.
For STRING, this is needed if values are not dictionary encoded, such as computed virtual columns, or can
optionally be used in place of SingleValueDimensionVectorSelector when using the dictionary isn't helpful.
Currently, this should only be called on single valued STRING inputs (multi-value STRING vector object selector
is not yet implemented).
If you need to write code that adapts to different input types, you should write a
VectorColumnProcessorFactory and use one of the
ColumnProcessors.makeVectorProcessor(java.lang.String, org.apache.druid.segment.VectorColumnProcessorFactory<T>, org.apache.druid.segment.vector.VectorColumnSelectorFactory) functions instead of using this method.makeObjectSelector in interface VectorColumnSelectorFactory@Nullable public ColumnCapabilities getColumnCapabilities(String columnName)
VectorColumnSelectorFactorygetColumnCapabilities in interface ColumnInspectorgetColumnCapabilities in interface VectorColumnSelectorFactorycolumnName - column nameCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.