public class UpperExtractionFn extends Object implements ExtractionFn
ExtractionFn.ExtractionType
Constructor and Description |
---|
UpperExtractionFn(String localeString) |
Modifier and Type | Method and Description |
---|---|
String |
apply(long value) |
String |
apply(Object value)
The "extraction" function.
|
String |
apply(String key) |
byte[] |
getCacheKey()
Returns a byte[] unique to all concrete implementations of DimExtractionFn.
|
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.
|
public UpperExtractionFn(String localeString)
@Nullable public String apply(String key)
apply
in interface ExtractionFn
key
- string input of extraction functionkey
as an upper case or null if key
is empty or nullpublic String apply(long value)
apply
in interface ExtractionFn
public boolean preservesOrdering()
ExtractionFn
Some optimizations of queries is possible if ordering is preserved. Null values *do* count towards ordering.
preservesOrdering
in interface ExtractionFn
public ExtractionFn.ExtractionType getExtractionType()
ExtractionFn
getExtractionType
in interface ExtractionFn
ExtractionFn.ExtractionType
declaring what kind of manipulation this
function doespublic byte[] getCacheKey()
ExtractionFn
getCacheKey
in interface ExtractionFn
public String apply(Object value)
ExtractionFn
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.
apply
in interface ExtractionFn
value
- the original value of the dimensionCopyright © 2011–2016. All rights reserved.