Package org.apache.druid.query.dimension
Class ExtractionDimensionSpec
- java.lang.Object
-
- org.apache.druid.query.dimension.ExtractionDimensionSpec
-
- All Implemented Interfaces:
Cacheable,DimensionSpec
public class ExtractionDimensionSpec extends Object implements DimensionSpec
-
-
Constructor Summary
Constructors Constructor Description ExtractionDimensionSpec(String dimension, String outputName, ExtractionFn extractionFn)ExtractionDimensionSpec(String dimension, String outputName, ColumnType outputType, ExtractionFn extractionFn)ExtractionDimensionSpec(String dimension, String outputName, ColumnType outputType, ExtractionFn extractionFn, ExtractionFn dimExtractionFn)
-
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()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?StringtoString()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, wait, wait, wait
-
Methods inherited from interface org.apache.druid.query.dimension.DimensionSpec
canVectorize, decorate, decorate
-
-
-
-
Constructor Detail
-
ExtractionDimensionSpec
public ExtractionDimensionSpec(String dimension, String outputName, ColumnType outputType, ExtractionFn extractionFn, @Deprecated ExtractionFn dimExtractionFn)
-
ExtractionDimensionSpec
public ExtractionDimensionSpec(String dimension, String outputName, ExtractionFn extractionFn)
-
ExtractionDimensionSpec
public ExtractionDimensionSpec(String dimension, String outputName, ColumnType outputType, ExtractionFn extractionFn)
-
-
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
-
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
-
-