Class SanitizationTransformer
- java.lang.Object
-
- org.apache.pinot.segment.local.recordtransformer.SanitizationTransformer
-
- All Implemented Interfaces:
Serializable,RecordTransformer
public class SanitizationTransformer extends Object implements RecordTransformer
TheSanitizationTransformerclass will sanitize the values to follow certain rules including:- No
nullcharacters in string values - String values are within the length limit TODO: add length limit to BYTES values if necessary
NOTE: should put this after the
DataTypeTransformerso that all values follow the data types inFieldSpec.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SanitizationTransformer(Schema schema)
-
Method Summary
Modifier and Type Method Description booleanisNoOp()Returnstrueif the transformer is no-op (can be skipped),falseotherwise.GenericRowtransform(GenericRow record)Transforms a record based on some custom rules.
-
-
-
Constructor Detail
-
SanitizationTransformer
public SanitizationTransformer(Schema schema)
-
-
Method Detail
-
isNoOp
public boolean isNoOp()
Description copied from interface:RecordTransformerReturnstrueif the transformer is no-op (can be skipped),falseotherwise.- Specified by:
isNoOpin interfaceRecordTransformer
-
transform
public GenericRow transform(GenericRow record)
Description copied from interface:RecordTransformerTransforms a record based on some custom rules.- Specified by:
transformin interfaceRecordTransformer- Parameters:
record- Record to transform- Returns:
- Transformed record, or
nullif the record does not follow certain rules.
-
-