Class TimeDimExtractionFn
- java.lang.Object
-
- org.apache.druid.query.extraction.DimExtractionFn
-
- org.apache.druid.query.extraction.TimeDimExtractionFn
-
- All Implemented Interfaces:
Cacheable
,ExtractionFn
public class TimeDimExtractionFn extends DimExtractionFn
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.druid.query.extraction.ExtractionFn
ExtractionFn.ExtractionType
-
-
Constructor Summary
Constructors Constructor Description TimeDimExtractionFn(String timeFormat, String resultFormat, boolean joda)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
apply(String dimValue)
The "extraction" function.boolean
equals(Object o)
byte[]
getCacheKey()
Get a byte array used as a cache key.ExtractionFn.ExtractionType
getExtractionType()
A dim extraction can be of one of two types, renaming or rebucketing.String
getResultFormat()
String
getTimeFormat()
int
hashCode()
boolean
isJoda()
boolean
preservesOrdering()
Offers information on whether the extraction will preserve the original ordering of the values.String
toString()
-
Methods inherited from class org.apache.druid.query.extraction.DimExtractionFn
apply, apply
-
-
-
-
Method Detail
-
getCacheKey
public byte[] getCacheKey()
Description copied from interface:Cacheable
Get a byte array used as a cache key.- Returns:
- a cache key
-
apply
@Nullable public String apply(@Nullable String dimValue)
Description copied from interface:ExtractionFn
The "extraction" function. This should map a String value into some other String value.Like
ExtractionFn.apply(Object)
, the empty string is considered invalid output for this method and it should instead return null.- Parameters:
dimValue
- the original value of the dimension- Returns:
- a value that should be used instead of the original
-
getTimeFormat
public String getTimeFormat()
-
getResultFormat
public String getResultFormat()
-
isJoda
public boolean isJoda()
-
preservesOrdering
public boolean preservesOrdering()
Description copied from interface:ExtractionFn
Offers information on whether the extraction will preserve the original ordering of the values.Some optimizations of queries is possible if ordering is preserved. Null values *do* count towards ordering.
- Returns:
- true if ordering is preserved, false otherwise
-
getExtractionType
public ExtractionFn.ExtractionType getExtractionType()
Description copied from interface:ExtractionFn
A dim extraction can be of one of two types, renaming or rebucketing. In the `ONE_TO_ONE` case, a unique values is modified into another unique value. In the `MANY_TO_ONE` case, there is no longer a 1:1 relation between old dimension value and new dimension value- Returns:
ExtractionFn.ExtractionType
declaring what kind of manipulation this function does
-
-