use of org.apache.flink.table.planner.functions.sql.SqlThrowExceptionFunction in project flink by apache.
the class ThrowExceptionConverter method convert.
@Override
public RexNode convert(CallExpression call, CallExpressionConvertRule.ConvertContext context) {
checkArgumentNumber(call, 2);
DataType type = ((TypeLiteralExpression) call.getChildren().get(1)).getOutputDataType();
SqlThrowExceptionFunction function = new SqlThrowExceptionFunction(context.getTypeFactory().createFieldTypeFromLogicalType(fromDataTypeToLogicalType(type)));
return context.getRelBuilder().call(function, context.toRexNode(call.getChildren().get(0)));
}
Aggregations