return protoRowType.apply(typeFactory);
}
private List<Pair<Primitive, Integer>> fieldClasses(
final JavaTypeFactory typeFactory) {
final RelDataType rowType = protoRowType.apply(typeFactory);
return Functions.adapt(
rowType.getFieldList(),
new Function1<RelDataTypeField, Pair<Primitive, Integer>>() {
public Pair<Primitive, Integer> apply(RelDataTypeField field) {
RelDataType type = field.getType();
Class clazz = (Class) typeFactory.getJavaClass(type);
return Pair.of(Util.first(Primitive.of(clazz), Primitive.OTHER),
type.getSqlTypeName().getJdbcOrdinal());
}
});
}