public static ExplicitReturnTypeInference explicit( RelProtoDataType protoType) { return new ExplicitReturnTypeInference(protoType); }
public RelDataType inferReturnType( SqlOperatorBinding opBinding) { if (type != null) { return opBinding.getTypeFactory().copyType(type); } return createType(opBinding.getTypeFactory()); }
private SqlOperator toOp(Schema.TableFunctionInSchema functionInSchema) { final TableFunction fun = functionInSchema.getTableFunction(); List<RelDataType> argTypes = new ArrayList<RelDataType>(); List<SqlTypeFamily> typeFamilies = new ArrayList<SqlTypeFamily>(); for (net.hydromatic.optiq.Parameter o : (List<net.hydromatic.optiq.Parameter>) fun.getParameters()) { argTypes.add(o.getType()); typeFamilies.add(SqlTypeFamily.ANY); } return new SqlFunction( functionInSchema.name, SqlKind.OTHER_FUNCTION, new ExplicitReturnTypeInference( typeFactory.createType(fun.getElementType())), new ExplicitOperandTypeInference(argTypes), SqlTypeStrategies.family(typeFamilies), null); }
new ExplicitReturnTypeInference(type); call.setOperator( new SqlFunction(