Class FunctionEvaluatorFactory
- java.lang.Object
-
- org.apache.pinot.segment.local.function.FunctionEvaluatorFactory
-
public class FunctionEvaluatorFactory extends Object
Factory class to create anFunctionEvaluatorfor the field spec based on theFieldSpec.getTransformFunction()
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FunctionEvaluatorgetExpressionEvaluator(String transformExpression)static FunctionEvaluatorgetExpressionEvaluator(FieldSpec fieldSpec)Creates theFunctionEvaluatorfor the given field spec 1.static booleanisGroovyExpression(String transformExpression)
-
-
-
Method Detail
-
getExpressionEvaluator
@Nullable public static FunctionEvaluator getExpressionEvaluator(FieldSpec fieldSpec)
Creates theFunctionEvaluatorfor the given field spec 1. If transform expression is defined, use it to create the appropriateFunctionEvaluator2. For TIME column, if conversion is needed,TimeSpecFunctionEvaluatorfor backward compatible handling of time spec. This is needed until we migrate toDateTimeFieldSpec3. For columns ending with __KEYS or __VALUES (used for interpreting Map column in Avro), create default groovy functions for handing the Map 4. Return null, if none of the above
-
getExpressionEvaluator
public static FunctionEvaluator getExpressionEvaluator(String transformExpression)
-
isGroovyExpression
public static boolean isGroovyExpression(String transformExpression)
- Returns:
- true if the given transform function is a groovy expression, otherwise returns false
-
-