public class DefaultDimensionSpec extends Object implements DimensionSpec
| Constructor and Description |
|---|
DefaultDimensionSpec(String dimension,
String outputName) |
DefaultDimensionSpec(String dimension,
String outputName,
ValueType outputType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canVectorize()
Does this DimensionSpec have working
DimensionSpec.decorate(SingleValueDimensionVectorSelector) and
DimensionSpec.decorate(MultiValueDimensionVectorSelector) methods? |
DimensionSelector |
decorate(DimensionSelector selector)
Decorate a
DimensionSelector, allowing custom transformation of underlying behavior (e.g. |
MultiValueDimensionVectorSelector |
decorate(MultiValueDimensionVectorSelector selector)
Vectorized analog of #decorate(DimensionSelector) for {@link MultiValueDimensionVectorSelector}, most likely
produced with
{@link org.apache.druid.segment.vector.VectorColumnSelectorFactory#makeMultiValueDimensionSelector(DimensionSpec)}
Decoration allows a {@link DimensionSpec} to customize the behavior of the underlying selector, for example
transforming or filtering values.
|
SingleValueDimensionVectorSelector |
decorate(SingleValueDimensionVectorSelector selector)
Vectorized analog of
DimensionSpec.decorate(DimensionSelector) for SingleValueDimensionVectorSelector, most
likely produced with
VectorColumnSelectorFactory.makeSingleValueDimensionSelector(DimensionSpec)
Decoration allows a DimensionSpec to customize the behavior of the underlying selector, for example
transforming or filtering values. |
boolean |
equals(Object o) |
byte[] |
getCacheKey() |
String |
getDimension() |
ExtractionFn |
getExtractionFn() |
String |
getOutputName() |
ValueType |
getOutputType() |
int |
hashCode() |
boolean |
mustDecorate()
Does this DimensionSpec require that decorate() be called to produce correct results?
|
static DefaultDimensionSpec |
of(String dimensionName) |
boolean |
preservesOrdering()
If the
DimensionSpec.decorate(org.apache.druid.segment.DimensionSelector) methods alter the underlying behavior of the dimension selector, does this alteration
preserve the original ordering? |
String |
toString() |
DimensionSpec |
withDimension(String newDimension)
Returns a copy of this DimensionSpec with the underlying dimension (the value of
DimensionSpec.getDimension())
replaced by "newDimension". |
public DefaultDimensionSpec(String dimension, @Nullable String outputName, @Nullable ValueType outputType)
public static DefaultDimensionSpec of(String dimensionName)
public String getDimension()
getDimension in interface DimensionSpecpublic String getOutputName()
getOutputName in interface DimensionSpecpublic ValueType getOutputType()
getOutputType in interface DimensionSpecpublic ExtractionFn getExtractionFn()
getExtractionFn in interface DimensionSpecpublic DimensionSelector decorate(DimensionSelector selector)
DimensionSpecDimensionSelector, allowing custom transformation of underlying behavior (e.g. performing
extraction functions in the case of ExtractionDimensionSpec, regex filtering in the case of
RegexFilteredDimensionSpec, and so on).decorate in interface DimensionSpecpublic SingleValueDimensionVectorSelector decorate(SingleValueDimensionVectorSelector selector)
DimensionSpecDimensionSpec.decorate(DimensionSelector) for SingleValueDimensionVectorSelector, most
likely produced with
VectorColumnSelectorFactory.makeSingleValueDimensionSelector(DimensionSpec)
Decoration allows a DimensionSpec to customize the behavior of the underlying selector, for example
transforming or filtering values.decorate in interface DimensionSpecpublic MultiValueDimensionVectorSelector decorate(MultiValueDimensionVectorSelector selector)
DimensionSpecdecorate in interface DimensionSpecpublic boolean canVectorize()
DimensionSpecDimensionSpec.decorate(SingleValueDimensionVectorSelector) and
DimensionSpec.decorate(MultiValueDimensionVectorSelector) methods?canVectorize in interface DimensionSpecpublic boolean mustDecorate()
DimensionSpecmustDecorate in interface DimensionSpecpublic byte[] getCacheKey()
getCacheKey in interface Cacheablepublic boolean preservesOrdering()
DimensionSpecDimensionSpec.decorate(org.apache.druid.segment.DimensionSelector) methods alter the underlying behavior of the dimension selector, does this alteration
preserve the original ordering?preservesOrdering in interface DimensionSpecpublic DimensionSpec withDimension(String newDimension)
DimensionSpecDimensionSpec.getDimension())
replaced by "newDimension".withDimension in interface DimensionSpecCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.