Package org.apache.druid.query.dimension
Class ExtractionDimensionSpec
java.lang.Object
org.apache.druid.query.dimension.ExtractionDimensionSpec
- All Implemented Interfaces:
Cacheable,DimensionSpec
-
Constructor Summary
ConstructorsConstructorDescriptionExtractionDimensionSpec(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
Modifier and TypeMethodDescriptiondecorate(DimensionSelector selector) Decorate aDimensionSelector, allowing custom transformation of underlying behavior (e.g.booleanbyte[]Get a byte array used as a cache key.inthashCode()booleanDoes this DimensionSpec require that decorate() be called to produce correct results?booleanIf theDimensionSpec.decorate(org.apache.druid.segment.DimensionSelector)methods alter the underlying behavior of the dimension selector, does this alteration preserve the original ordering?toString()withDimension(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, waitMethods inherited from interface org.apache.druid.query.dimension.DimensionSpec
canVectorize, decorate, decorate
-
Constructor Details
-
ExtractionDimensionSpec
public ExtractionDimensionSpec(String dimension, String outputName, ColumnType outputType, ExtractionFn extractionFn, @Deprecated ExtractionFn dimExtractionFn) -
ExtractionDimensionSpec
-
ExtractionDimensionSpec
public ExtractionDimensionSpec(String dimension, String outputName, ColumnType outputType, ExtractionFn extractionFn)
-
-
Method Details
-
getDimension
- Specified by:
getDimensionin interfaceDimensionSpec
-
getOutputName
- Specified by:
getOutputNamein interfaceDimensionSpec
-
getOutputType
- Specified by:
getOutputTypein interfaceDimensionSpec
-
getExtractionFn
- Specified by:
getExtractionFnin interfaceDimensionSpec
-
decorate
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:
- bytes to be used as cache key - or null if this object should not be cached.
-
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
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
-
toString
-
equals
-
hashCode
public int hashCode()
-