RelRecordType rec = (RelRecordType) type; RelDataType nodeType = rec.getFieldList().get(0).getType(); nodeType = typeFactory.createTypeWithNullability(nodeType, true); fieldList.add(Pair.of(alias, nodeType));
@Override public RelDataType get(int index) { RelDataType fieldType = type.getFieldList().get(index).getType(); if (ignoreNullable) { return copyType(fieldType); } else { return createTypeWithNullability(fieldType, nullable); } }
@Override public RelDataType get(int index) { RelDataType fieldType = type.getFieldList().get(index).getType(); if (ignoreNullable) { return copyType(fieldType); } else { return createTypeWithNullability(fieldType, nullable); } }
RelRecordType rec = (RelRecordType) type; RelDataType nodeType = rec.getFieldList().get(0).getType(); nodeType = typeFactory.createTypeWithNullability(nodeType, true); fieldList.add(Pair.of(alias, nodeType));
RelRecordType rec = (RelRecordType) type; RelDataType nodeType = rec.getFieldList().get(0).getType(); nodeType = typeFactory.createTypeWithNullability(nodeType, true); fieldList.add(Pair.of(alias, nodeType));
/** Creates a synthetic Java class whose fields have the same names and * relational types. */ private Type createSyntheticType(RelRecordType type) { final String name = "Record" + type.getFieldCount() + "_" + syntheticTypes.size(); final SyntheticRecordType syntheticType = new SyntheticRecordType(type, name); for (final RelDataTypeField recordField : type.getFieldList()) { final Type javaClass = getJavaClass(recordField.getType()); syntheticType.fields.add( new RecordFieldImpl( syntheticType, recordField.getName(), javaClass, recordField.getType().isNullable() && !Primitive.is(javaClass), Modifier.PUBLIC)); } return register(syntheticType); }
/** Creates a synthetic Java class whose fields have the same names and * relational types. */ private Type createSyntheticType(RelRecordType type) { final String name = "Record" + type.getFieldCount() + "_" + syntheticTypes.size(); final SyntheticRecordType syntheticType = new SyntheticRecordType(type, name); for (final RelDataTypeField recordField : type.getFieldList()) { final Type javaClass = getJavaClass(recordField.getType()); syntheticType.fields.add( new RecordFieldImpl( syntheticType, recordField.getName(), javaClass, recordField.getType().isNullable() && !Primitive.is(javaClass), Modifier.PUBLIC)); } return register(syntheticType); }