public class ListFilteredVirtualColumn extends Object implements VirtualColumn
| Constructor and Description |
|---|
ListFilteredVirtualColumn(String name,
DimensionSpec delegate,
Set<String> values,
Boolean isAllowList) |
| Modifier and Type | Method and Description |
|---|---|
ColumnCapabilities |
capabilities(ColumnInspector inspector,
String columnName)
Return the
ColumnCapabilities which best describe the optimal selector to read from this virtual column. |
ColumnCapabilities |
capabilities(String columnName)
This method is deprecated in favor of
VirtualColumn.capabilities(ColumnInspector, String), which should be used whenever
possible and can support virtual column implementations that need to inspect other columns as inputs. |
boolean |
equals(Object o) |
byte[] |
getCacheKey() |
DimensionSpec |
getDelegate() |
ColumnIndexSupplier |
getIndexSupplier(String columnName,
ColumnSelector columnSelector)
Get the
ColumnIndexSupplier for the specified virtual column, with the assistance of a
ColumnSelector to allow reading things from segments. |
String |
getOutputName()
Output name of this column.
|
Set<String> |
getValues() |
int |
hashCode() |
boolean |
isAllowList() |
ColumnValueSelector<?> |
makeColumnValueSelector(String columnName,
ColumnSelectorFactory factory)
Build a
ColumnValueSelector corresponding to this virtual column. |
DimensionSelector |
makeDimensionSelector(DimensionSpec dimensionSpec,
ColumnSelectorFactory factory)
Build a selector corresponding to this virtual column.
|
List<String> |
requiredColumns()
Returns a list of columns that this virtual column will access.
|
String |
toString() |
boolean |
usesDotNotation()
Indicates that this virtual column can be referenced with dot notation.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcanVectorize, makeColumnValueSelector, makeDimensionSelector, makeMultiValueVectorDimensionSelector, makeMultiValueVectorDimensionSelector, makeSingleValueVectorDimensionSelector, makeSingleValueVectorDimensionSelector, makeVectorObjectSelector, makeVectorObjectSelector, makeVectorValueSelector, makeVectorValueSelectorpublic String getOutputName()
VirtualColumngetOutputName in interface VirtualColumnpublic boolean isAllowList()
public DimensionSpec getDelegate()
public byte[] getCacheKey()
getCacheKey in interface Cacheablepublic DimensionSelector makeDimensionSelector(DimensionSpec dimensionSpec, ColumnSelectorFactory factory)
VirtualColumnDimensionSpec.getDimension(), which
is useful if this column uses dot notation. The virtual column is expected to apply any
necessary decoration from the dimensionSpec.makeDimensionSelector in interface VirtualColumnpublic ColumnValueSelector<?> makeColumnValueSelector(String columnName, ColumnSelectorFactory factory)
VirtualColumnColumnValueSelector corresponding to this virtual column. Also provides the name that the
virtual column was referenced with, which is useful if this column uses dot notation.makeColumnValueSelector in interface VirtualColumnpublic ColumnCapabilities capabilities(String columnName)
VirtualColumnVirtualColumn.capabilities(ColumnInspector, String), which should be used whenever
possible and can support virtual column implementations that need to inspect other columns as inputs.
This is a fallback implementation to return the capabilities of this virtual column, which includes a type that
corresponds to the best performing base selector supertype (e. g. BaseLongColumnValueSelector) of the
object, returned from VirtualColumn.makeColumnValueSelector(String, ColumnSelectorFactory). May vary based on columnName
if this column uses dot notation.capabilities in interface VirtualColumncolumnName - the name this virtual column was referenced withpublic ColumnCapabilities capabilities(ColumnInspector inspector, String columnName)
VirtualColumnColumnCapabilities which best describe the optimal selector to read from this virtual column.
The ColumnInspector (most likely corresponding to an underlying ColumnSelectorFactory of a query)
allows the virtual column to consider this information if necessary to compute its output type details.
Examples of this include the ExpressionVirtualColumn, which takes input from other columns and uses the
ColumnInspector to infer the output type of expressions based on the types of the inputs.capabilities in interface VirtualColumninspector - column inspector to provide additional information of other available columnscolumnName - the name this virtual column was referenced withpublic List<String> requiredColumns()
VirtualColumnrequiredColumns in interface VirtualColumnpublic boolean usesDotNotation()
VirtualColumnusesDotNotation in interface VirtualColumn@Nullable public ColumnIndexSupplier getIndexSupplier(String columnName, ColumnSelector columnSelector)
VirtualColumnColumnIndexSupplier for the specified virtual column, with the assistance of a
ColumnSelector to allow reading things from segments. If the virtual column has no indexes, this method
will return null, or may also return a non-null supplier whose methods may return null values - having a supplier
is no guarantee that the column has indexes.getIndexSupplier in interface VirtualColumnCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.