Package org.apache.druid.query.dimension
Interface DimensionSpec
- All Superinterfaces:
Cacheable
- All Known Implementing Classes:
BaseFilteredDimensionSpec,DefaultDimensionSpec,ExtractionDimensionSpec,LegacyDimensionSpec,ListFilteredDimensionSpec,LookupDimensionSpec,PrefixFilteredDimensionSpec,RegexFilteredDimensionSpec
Provides information about a dimension for a grouping query, like topN or groupBy. Note that this is not annotated
with
PublicApi, since it is not meant to be stable for usage by non-built-in queries.-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanDoes this DimensionSpec have workingdecorate(SingleValueDimensionVectorSelector)anddecorate(MultiValueDimensionVectorSelector)methods?decorate(DimensionSelector selector) Decorate aDimensionSelector, allowing custom transformation of underlying behavior (e.g.decorate(MultiValueDimensionVectorSelector selector) 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.Deprecated.booleanDoes this DimensionSpec require that decorate() be called to produce correct results?booleanIf thedecorate(org.apache.druid.segment.DimensionSelector)methods alter the underlying behavior of the dimension selector, does this alteration preserve the original ordering?withDimension(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 Details
-
getDimension
String getDimension() -
getOutputName
String getOutputName() -
getOutputType
ColumnType getOutputType() -
getExtractionFn
Deprecated. -
decorate
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
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
-
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
Returns a copy of this DimensionSpec with the underlying dimension (the value ofgetDimension()) replaced by "newDimension".
-