public interface ExtractionFn extends Cacheable
Modifier and Type | Interface and Description |
---|---|
static class |
ExtractionFn.ExtractionType |
Modifier and Type | Method and Description |
---|---|
String |
apply(long value)
The "extraction" function.
|
String |
apply(Object value)
The "extraction" function.
|
String |
apply(String value)
The "extraction" function.
|
ExtractionFn.ExtractionType |
getExtractionType()
A dim extraction can be of one of two types, renaming or rebucketing.
|
boolean |
preservesOrdering()
Offers information on whether the extraction will preserve the original ordering of the values.
|
getCacheKey
@Nullable String apply(@Nullable Object value)
In order to maintain the "null and empty string are equivalent" semantics that Druid provides, the empty string is considered invalid output for this method and should instead return null. This is a contract on the method rather than enforced at a lower level in order to eliminate a global check for extraction functions that do not already need one.
value
- the original value of the dimension@Nullable String apply(@Nullable String value)
Like apply(Object)
, the empty string is considered invalid output for this method and it should
instead return null.
value
- the original value of the dimensionString apply(long value)
Like apply(Object)
, the empty string is considered invalid output for this method and it should
instead return null.
value
- the original value of the dimensionboolean preservesOrdering()
Some optimizations of queries is possible if ordering is preserved. Null values *do* count towards ordering.
ExtractionFn.ExtractionType getExtractionType()
ExtractionFn.ExtractionType
declaring what kind of manipulation this function doesCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.