Class SpecialValueTransformer
- java.lang.Object
-
- org.apache.pinot.segment.local.recordtransformer.SpecialValueTransformer
-
- All Implemented Interfaces:
Serializable,RecordTransformer
public class SpecialValueTransformer extends Object implements RecordTransformer
TheSpecialValueTransformerclass will transform special values according to the following rules:- Negative zero (-0.0) should be converted to 0.0
- NaN should be converted to default null
NOTE: should put this after the
DataTypeTransformerso that we already have the values complying with the schema before handling special values and beforeNullValueTransformerso that it transforms all the null values properly.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SpecialValueTransformer(Schema schema)
-
Method Summary
All Methods Instance Methods Concrete Methods 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
-
SpecialValueTransformer
public SpecialValueTransformer(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.
-
-