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 DimensionSelector
decorate(DimensionSelector selector)
Decorate aDimensionSelector
, allowing custom transformation of underlying behavior (e.g.boolean
equals(Object o)
byte[]
getCacheKey()
Get a byte array used as a cache key.String
getDimension()
ExtractionFn
getExtractionFn()
String
getOutputName()
ColumnType
getOutputType()
int
hashCode()
boolean
mustDecorate()
Does this DimensionSpec require that decorate() be called to produce correct results?boolean
preservesOrdering()
If theDimensionSpec.decorate(org.apache.druid.segment.DimensionSelector)
methods alter the underlying behavior of the dimension selector, does this alteration preserve the original ordering?String
toString()
DimensionSpec
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, 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:
getDimension
in interfaceDimensionSpec
-
getOutputName
public String getOutputName()
- Specified by:
getOutputName
in interfaceDimensionSpec
-
getOutputType
public ColumnType getOutputType()
- Specified by:
getOutputType
in interfaceDimensionSpec
-
getExtractionFn
public ExtractionFn getExtractionFn()
- Specified by:
getExtractionFn
in interfaceDimensionSpec
-
decorate
public DimensionSelector decorate(DimensionSelector selector)
Description copied from interface:DimensionSpec
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).- Specified by:
decorate
in interfaceDimensionSpec
-
mustDecorate
public boolean mustDecorate()
Description copied from interface:DimensionSpec
Does this DimensionSpec require that decorate() be called to produce correct results?- Specified by:
mustDecorate
in interfaceDimensionSpec
-
getCacheKey
public byte[] getCacheKey()
Description copied from interface:Cacheable
Get a byte array used as a cache key.- Specified by:
getCacheKey
in interfaceCacheable
- Returns:
- a cache key
-
preservesOrdering
public boolean preservesOrdering()
Description copied from interface:DimensionSpec
If 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:
preservesOrdering
in interfaceDimensionSpec
-
withDimension
public DimensionSpec withDimension(String newDimension)
Description copied from interface:DimensionSpec
Returns a copy of this DimensionSpec with the underlying dimension (the value ofDimensionSpec.getDimension()
) replaced by "newDimension".- Specified by:
withDimension
in interfaceDimensionSpec
-
-