Package org.apache.druid.query.dimension
Class LookupDimensionSpec
- java.lang.Object
-
- org.apache.druid.query.dimension.LookupDimensionSpec
-
- All Implemented Interfaces:
Cacheable,DimensionSpec
public class LookupDimensionSpec extends Object implements DimensionSpec
-
-
Constructor Summary
Constructors Constructor Description LookupDimensionSpec(String dimension, String outputName, LookupExtractor lookup, boolean retainMissingValue, String replaceMissingValueWith, String name, Boolean optimize, LookupExtractorFactoryContainerProvider lookupExtractorFactoryContainerProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DimensionSelectordecorate(DimensionSelector selector)Decorate aDimensionSelector, allowing custom transformation of underlying behavior (e.g.booleanequals(Object o)byte[]getCacheKey()Get a byte array used as a cache key.StringgetDimension()ExtractionFngetExtractionFn()LookupExtractorgetLookup()StringgetName()StringgetOutputName()ColumnTypegetOutputType()inthashCode()booleanmustDecorate()Does this DimensionSpec require that decorate() be called to produce correct results?booleanpreservesOrdering()If theDimensionSpec.decorate(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 ofDimensionSpec.getDimension()) replaced by "newDimension".-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.query.dimension.DimensionSpec
canVectorize, decorate, decorate
-
-
-
-
Constructor Detail
-
LookupDimensionSpec
public LookupDimensionSpec(String dimension, String outputName, LookupExtractor lookup, boolean retainMissingValue, String replaceMissingValueWith, String name, Boolean optimize, LookupExtractorFactoryContainerProvider lookupExtractorFactoryContainerProvider)
-
-
Method Detail
-
getDimension
public String getDimension()
- Specified by:
getDimensionin interfaceDimensionSpec
-
getOutputName
public String getOutputName()
- Specified by:
getOutputNamein interfaceDimensionSpec
-
getOutputType
public ColumnType getOutputType()
- Specified by:
getOutputTypein interfaceDimensionSpec
-
getLookup
@Nullable public LookupExtractor getLookup()
-
getExtractionFn
public ExtractionFn getExtractionFn()
- Specified by:
getExtractionFnin interfaceDimensionSpec
-
decorate
public DimensionSelector decorate(DimensionSelector selector)
Description copied from interface:DimensionSpecDecorate 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).- Specified by:
decoratein interfaceDimensionSpec
-
mustDecorate
public boolean mustDecorate()
Description copied from interface:DimensionSpecDoes this DimensionSpec require that decorate() be called to produce correct results?- Specified by:
mustDecoratein interfaceDimensionSpec
-
getCacheKey
public byte[] getCacheKey()
Description copied from interface:CacheableGet a byte array used as a cache key.- Specified by:
getCacheKeyin interfaceCacheable- Returns:
- a cache key
-
preservesOrdering
public boolean preservesOrdering()
Description copied from interface:DimensionSpecIf theDimensionSpec.decorate(org.apache.druid.segment.DimensionSelector)methods alter the underlying behavior of the dimension selector, does this alteration preserve the original ordering?- Specified by:
preservesOrderingin interfaceDimensionSpec
-
withDimension
public DimensionSpec withDimension(String newDimension)
Description copied from interface:DimensionSpecReturns a copy of this DimensionSpec with the underlying dimension (the value ofDimensionSpec.getDimension()) replaced by "newDimension".- Specified by:
withDimensionin interfaceDimensionSpec
-
-