public class ExpressionVirtualColumn extends Object implements VirtualColumn
Constructor and Description |
---|
ExpressionVirtualColumn(String name,
String expression,
ValueType outputType,
ExprMacroTable macroTable) |
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.
|
boolean |
equals(Object o) |
byte[] |
getCacheKey()
Get a byte array used as a cache key.
|
String |
getExpression() |
String |
getOutputName()
Output name of this column.
|
ValueType |
getOutputType() |
int |
hashCode() |
ColumnValueSelector<?> |
makeColumnValueSelector(String columnName,
ColumnSelectorFactory factory)
Build a selector corresponding to this virtual column.
|
DimensionSelector |
makeDimensionSelector(DimensionSpec dimensionSpec,
ColumnSelectorFactory columnSelectorFactory)
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.
|
public ExpressionVirtualColumn(String name, String expression, ValueType outputType, ExprMacroTable macroTable)
public String getOutputName()
VirtualColumn
getOutputName
in interface VirtualColumn
public String getExpression()
public ValueType getOutputType()
public DimensionSelector makeDimensionSelector(DimensionSpec dimensionSpec, ColumnSelectorFactory columnSelectorFactory)
VirtualColumn
DimensionSpec.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 VirtualColumn
dimensionSpec
- the dimensionSpec this column was referenced withcolumnSelectorFactory
- column selector factorypublic ColumnValueSelector<?> makeColumnValueSelector(String columnName, ColumnSelectorFactory factory)
VirtualColumn
makeColumnValueSelector
in interface VirtualColumn
columnName
- the name this virtual column was referenced withfactory
- column selector factorypublic ColumnCapabilities capabilities(String columnName)
VirtualColumn
BaseLongColumnValueSelector
) of the object, returned from
VirtualColumn.makeColumnValueSelector(String, ColumnSelectorFactory)
. May vary based on columnName if this column uses
dot notation.capabilities
in interface VirtualColumn
columnName
- the name this virtual column was referenced withpublic List<String> requiredColumns()
VirtualColumn
requiredColumns
in interface VirtualColumn
public boolean usesDotNotation()
VirtualColumn
usesDotNotation
in interface VirtualColumn
public byte[] getCacheKey()
Cacheable
getCacheKey
in interface Cacheable
Copyright © 2011–2018. All rights reserved.