Package org.apache.druid.query.dimension
Interface DimensionSpec
-
- All Superinterfaces:
Cacheable
- All Known Implementing Classes:
BaseFilteredDimensionSpec,DefaultDimensionSpec,ExtractionDimensionSpec,LegacyDimensionSpec,ListFilteredDimensionSpec,LookupDimensionSpec,PrefixFilteredDimensionSpec,RegexFilteredDimensionSpec
@SubclassesMustOverrideEqualsAndHashCode public interface DimensionSpec extends Cacheable
Provides information about a dimension for a grouping query, like topN or groupBy. Note that this is not annotated withPublicApi, since it is not meant to be stable for usage by non-built-in queries.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default booleancanVectorize()Does this DimensionSpec have workingdecorate(SingleValueDimensionVectorSelector)anddecorate(MultiValueDimensionVectorSelector)methods?DimensionSelectordecorate(DimensionSelector selector)Decorate aDimensionSelector, allowing custom transformation of underlying behavior (e.g.default MultiValueDimensionVectorSelectordecorate(MultiValueDimensionVectorSelector selector)default SingleValueDimensionVectorSelectordecorate(SingleValueDimensionVectorSelector selector)Vectorized analog ofdecorate(DimensionSelector)forSingleValueDimensionVectorSelector, most likely produced withVectorColumnSelectorFactory.makeSingleValueDimensionSelector(DimensionSpec)Decoration allows aDimensionSpecto customize the behavior of the underlying selector, for example transforming or filtering values.StringgetDimension()ExtractionFngetExtractionFn()Deprecated.StringgetOutputName()ColumnTypegetOutputType()booleanmustDecorate()Does this DimensionSpec require that decorate() be called to produce correct results?booleanpreservesOrdering()If thedecorate(org.apache.druid.segment.DimensionSelector)methods alter the underlying behavior of the dimension selector, does this alteration preserve the original ordering?DimensionSpecwithDimension(String newDimension)Returns a copy of this DimensionSpec with the underlying dimension (the value ofgetDimension()) replaced by "newDimension".-
Methods inherited from interface org.apache.druid.java.util.common.Cacheable
getCacheKey
-
-
-
-
Method Detail
-
getDimension
String getDimension()
-
getOutputName
String getOutputName()
-
getOutputType
ColumnType getOutputType()
-
getExtractionFn
@Deprecated @Nullable ExtractionFn getExtractionFn()
Deprecated.
-
decorate
DimensionSelector decorate(DimensionSelector selector)
Decorate aDimensionSelector, allowing custom transformation of underlying behavior (e.g. performing extraction functions in the case ofExtractionDimensionSpec, regex filtering in the case ofRegexFilteredDimensionSpec, and so on).
-
decorate
default SingleValueDimensionVectorSelector decorate(SingleValueDimensionVectorSelector selector)
Vectorized analog ofdecorate(DimensionSelector)forSingleValueDimensionVectorSelector, most likely produced withVectorColumnSelectorFactory.makeSingleValueDimensionSelector(DimensionSpec)Decoration allows aDimensionSpecto customize the behavior of the underlying selector, for example transforming or filtering values.
-
decorate
default MultiValueDimensionVectorSelector decorate(MultiValueDimensionVectorSelector selector)
-
mustDecorate
boolean mustDecorate()
Does this DimensionSpec require that decorate() be called to produce correct results?
-
canVectorize
default boolean canVectorize()
Does this DimensionSpec have workingdecorate(SingleValueDimensionVectorSelector)anddecorate(MultiValueDimensionVectorSelector)methods?
-
preservesOrdering
boolean preservesOrdering()
If thedecorate(org.apache.druid.segment.DimensionSelector)methods alter the underlying behavior of the dimension selector, does this alteration preserve the original ordering?
-
withDimension
DimensionSpec withDimension(String newDimension)
Returns a copy of this DimensionSpec with the underlying dimension (the value ofgetDimension()) replaced by "newDimension".
-
-