public interface VirtualColumn extends Cacheable
| Modifier and Type | Method and Description |
|---|---|
ColumnCapabilities |
capabilities(String columnName)
Returns the capabilities of this virtual column, which includes a type that corresponds to the best
performing base selector supertype (e.
|
default BitmapIndex |
getBitmapIndex(String columnName,
ColumnSelector selector)
Returns the BitmapIndex for efficient filtering on columns that support it.
|
String |
getOutputName()
Output name of this column.
|
ColumnValueSelector<?> |
makeColumnValueSelector(String columnName,
ColumnSelectorFactory factory)
Build a selector corresponding to this virtual column.
|
default ColumnValueSelector<?> |
makeColumnValueSelector(String columnName,
ColumnSelector columnSelector,
ReadableOffset offset)
Returns similar ColumnValueSelector object as returned by
makeColumnValueSelector(String, ColumnSelectorFactory)
except this method has full access to underlying column and can potentially provide a more efficient implementation. |
DimensionSelector |
makeDimensionSelector(DimensionSpec dimensionSpec,
ColumnSelectorFactory factory)
Build a selector corresponding to this virtual column.
|
default DimensionSelector |
makeDimensionSelector(DimensionSpec dimensionSpec,
ColumnSelector columnSelector,
ReadableOffset offset)
Returns similar DimensionSelector object as returned by
makeDimensionSelector(DimensionSpec, ColumnSelectorFactory)
except this method has full access to underlying column and can potentially provide a more efficient implementation. |
List<String> |
requiredColumns()
Returns a list of columns that this virtual column will access.
|
boolean |
usesDotNotation()
Indicates that this virtual column can be referenced with dot notation.
|
getCacheKeyString getOutputName()
DimensionSelector makeDimensionSelector(DimensionSpec dimensionSpec, ColumnSelectorFactory factory)
DimensionSpec.getDimension(), which
is useful if this column uses dot notation. The virtual column is expected to apply any
necessary decoration from the dimensionSpec.dimensionSpec - the dimensionSpec this column was referenced withfactory - column selector factory@Nullable default DimensionSelector makeDimensionSelector(DimensionSpec dimensionSpec, ColumnSelector columnSelector, ReadableOffset offset)
makeDimensionSelector(DimensionSpec, ColumnSelectorFactory)
except this method has full access to underlying column and can potentially provide a more efficient implementation.
Users of this interface must ensure to first call this method whenever possible. Typically this can not be called in
query paths on top of IncrementalIndex which doesn't have columns as in persisted segments.dimensionSpec - columnSelector - offset - ColumnValueSelector<?> makeColumnValueSelector(String columnName, ColumnSelectorFactory factory)
columnName - the name this virtual column was referenced withfactory - column selector factory@Nullable default ColumnValueSelector<?> makeColumnValueSelector(String columnName, ColumnSelector columnSelector, ReadableOffset offset)
makeColumnValueSelector(String, ColumnSelectorFactory)
except this method has full access to underlying column and can potentially provide a more efficient implementation.
Users of this interface must ensure to first call this method whenever possible. Typically this can not be called in
query paths on top of IncrementalIndex which doesn't have columns as in persisted segments.columnName - columnSelector - offset - ColumnCapabilities capabilities(String columnName)
BaseLongColumnValueSelector) of the object, returned from
makeColumnValueSelector(String, ColumnSelectorFactory). May vary based on columnName if this column uses
dot notation.columnName - the name this virtual column was referenced withList<String> requiredColumns()
boolean usesDotNotation()
default BitmapIndex getBitmapIndex(String columnName, ColumnSelector selector)
ColumnCapabilities returned from capabilities(String) has flag for BitmapIndex support.columnName - selector - Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.