Class RegexDimExtractionFn
java.lang.Object
org.apache.druid.query.extraction.DimExtractionFn
org.apache.druid.query.extraction.RegexDimExtractionFn
- All Implemented Interfaces:
Cacheable,ExtractionFn
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.druid.query.extraction.ExtractionFn
ExtractionFn.ExtractionType -
Constructor Summary
ConstructorsConstructorDescriptionRegexDimExtractionFn(String expr, Boolean replaceMissingValue, String replaceMissingValueWith) RegexDimExtractionFn(String expr, Integer index, Boolean replaceMissingValue, String replaceMissingValueWith) -
Method Summary
Modifier and TypeMethodDescriptionThe "extraction" function.booleanbyte[]Get a byte array used as a cache key.getExpr()A dim extraction can be of one of two types, renaming or rebucketing.intgetIndex()inthashCode()booleanbooleanOffers information on whether the extraction will preserve the original ordering of the values.toString()Methods inherited from class org.apache.druid.query.extraction.DimExtractionFn
apply, apply
-
Constructor Details
-
RegexDimExtractionFn
-
RegexDimExtractionFn
-
-
Method Details
-
getCacheKey
public byte[] getCacheKey()Description copied from interface:CacheableGet a byte array used as a cache key.- Returns:
- bytes to be used as cache key - or null if this object should not be cached.
-
apply
Description copied from interface:ExtractionFnThe "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
-
getExpr
-
getIndex
public int getIndex() -
isReplaceMissingValue
public boolean isReplaceMissingValue() -
getReplaceMissingValueWith
-
preservesOrdering
public boolean preservesOrdering()Description copied from interface:ExtractionFnOffers 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
Description copied from interface:ExtractionFnA 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.ExtractionTypedeclaring what kind of manipulation this function does
-
toString
-
equals
-
hashCode
public int hashCode()
-