private RelDataType copyRecordType( final RelRecordType type, final boolean ignoreNullable, final boolean nullable) { // REVIEW: angel 18-Aug-2005 dtbug336 // Shouldn't null refer to the nullability of the record type // not the individual field types? // For flattening and outer joins, it is desirable to change // the nullability of the individual fields. return createStructType(type.getStructKind(), new AbstractList<RelDataType>() { @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 int size() { return type.getFieldCount(); } }, type.getFieldNames()); }
private RelDataType copyRecordType( final RelRecordType type, final boolean ignoreNullable, final boolean nullable) { // REVIEW: angel 18-Aug-2005 dtbug336 // Shouldn't null refer to the nullability of the record type // not the individual field types? // For flattening and outer joins, it is desirable to change // the nullability of the individual fields. return createStructType(type.getStructKind(), new AbstractList<RelDataType>() { @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 int size() { return type.getFieldCount(); } }, type.getFieldNames()); }