public class RegexDimExtractionFn extends DimExtractionFn
ExtractionFn.ExtractionType
Constructor and Description |
---|
RegexDimExtractionFn(String expr,
Boolean replaceMissingValue,
String replaceMissingValueWith) |
RegexDimExtractionFn(String expr,
Integer index,
Boolean replaceMissingValue,
String replaceMissingValueWith) |
Modifier and Type | Method and Description |
---|---|
String |
apply(String dimValue)
The "extraction" function.
|
boolean |
equals(Object o) |
byte[] |
getCacheKey() |
String |
getExpr() |
ExtractionFn.ExtractionType |
getExtractionType()
A dim extraction can be of one of two types, renaming or rebucketing.
|
int |
getIndex() |
String |
getReplaceMissingValueWith() |
int |
hashCode() |
boolean |
isReplaceMissingValue() |
boolean |
preservesOrdering()
Offers information on whether the extraction will preserve the original ordering of the values.
|
String |
toString() |
apply, apply
public RegexDimExtractionFn(String expr, Integer index, Boolean replaceMissingValue, String replaceMissingValueWith)
public byte[] getCacheKey()
@Nullable public String apply(@Nullable String dimValue)
ExtractionFn
Like ExtractionFn.apply(Object)
, the empty string is considered invalid output for this method and it should
instead return null.
dimValue
- the original value of the dimensionpublic String getExpr()
public int getIndex()
public boolean isReplaceMissingValue()
public String getReplaceMissingValueWith()
public boolean preservesOrdering()
ExtractionFn
Some optimizations of queries is possible if ordering is preserved. Null values *do* count towards ordering.
public ExtractionFn.ExtractionType getExtractionType()
ExtractionFn
ExtractionFn.ExtractionType
declaring what kind of manipulation this function doesCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.