public RexNode convertFunction( SqlRexContext cx, SqlFunction fun, SqlCall call) { final List<SqlNode> operands = call.getOperandList(); final List<RexNode> exprs = convertExpressionList(cx, operands, SqlOperandTypeChecker.Consistency.NONE); if (fun.getFunctionType() == SqlFunctionCategory.USER_DEFINED_CONSTRUCTOR) { return makeConstructorCall(cx, fun, exprs); } RelDataType returnType = cx.getValidator().getValidatedNodeTypeIfKnown(call); if (returnType == null) { returnType = cx.getRexBuilder().deriveReturnType(fun, exprs); } return cx.getRexBuilder().makeCall(returnType, fun, exprs); }
public RexNode convertFunction( SqlRexContext cx, SqlFunction fun, SqlCall call) { final List<SqlNode> operands = call.getOperandList(); final List<RexNode> exprs = convertExpressionList(cx, operands, SqlOperandTypeChecker.Consistency.NONE); if (fun.getFunctionType() == SqlFunctionCategory.USER_DEFINED_CONSTRUCTOR) { return makeConstructorCall(cx, fun, exprs); } RelDataType returnType = cx.getValidator().getValidatedNodeTypeIfKnown(call); if (returnType == null) { returnType = cx.getRexBuilder().deriveReturnType(fun, exprs); } return cx.getRexBuilder().makeCall(returnType, fun, exprs); }