Interface ExpressionCodeGeneratorCastRule<IN,OUT>
- Type Parameters:
IN- Input internal typeOUT- Output internal type
- All Superinterfaces:
CastRule<IN,,OUT> CodeGeneratorCastRule<IN,OUT>
@Internal
public interface ExpressionCodeGeneratorCastRule<IN,OUT>
extends CodeGeneratorCastRule<IN,OUT>
Cast rule that is able to generate a single expression containing all the casting logic.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule
CodeGeneratorCastRule.Context -
Method Summary
Modifier and TypeMethodDescriptiongenerateExpression(CodeGeneratorCastRule.Context context, String inputTerm, org.apache.flink.table.types.logical.LogicalType inputLogicalType, org.apache.flink.table.types.logical.LogicalType targetLogicalType) Generate a Java expression performing the casting.Methods inherited from interface org.apache.flink.table.planner.functions.casting.CastRule
canFail, create, getPredicateDefinitionMethods inherited from interface org.apache.flink.table.planner.functions.casting.CodeGeneratorCastRule
generateCodeBlock
-
Method Details
-
generateExpression
String generateExpression(CodeGeneratorCastRule.Context context, String inputTerm, org.apache.flink.table.types.logical.LogicalType inputLogicalType, org.apache.flink.table.types.logical.LogicalType targetLogicalType) Generate a Java expression performing the casting. This expression can be wrapped in another expression, or assigned to a variable or returned from a function.NOTE: the
inputTermis always either a primitive or a non-null object, while the expression result is either a primitive or a nullable object.
-