/** * Constructs an object type. This should only be called from a factory * method. * * @param typeName SqlTypeName for this type (either Distinct or * Structured) * @param sqlIdentifier identifier for this type * @param nullable whether type accepts nulls * @param fields object attribute definitions */ public ObjectSqlType( SqlTypeName typeName, SqlIdentifier sqlIdentifier, boolean nullable, List<? extends RelDataTypeField> fields, RelDataTypeComparability comparability) { super(typeName, nullable, fields); this.sqlIdentifier = sqlIdentifier; this.comparability = comparability; computeDigest(); }
protected RelDataType canonize(RelDataType type) { type = super.canonize(type); if (!(type instanceof ObjectSqlType)) { return type; } ObjectSqlType objectType = (ObjectSqlType) type; if (!objectType.isNullable()) { objectType.setFamily(objectType); } else { objectType.setFamily( (RelDataTypeFamily) createTypeWithNullability( objectType, false)); } return type; }
private RelDataType copyObjectType(RelDataType type, boolean nullable) { return new ObjectSqlType( type.getSqlTypeName(), type.getSqlIdentifier(), nullable, type.getFieldList(), type.getComparability()); }
@Override public RelDataType getNamedType(SqlIdentifier typeName) { if (typeName.equalsDeep(fixture.addressType.getSqlIdentifier(), Litmus.IGNORE)) { return fixture.addressType; } else { return super.getNamedType(typeName); } }
private RelDataType copyObjectType(RelDataType type, boolean nullable) { return new ObjectSqlType( type.getSqlTypeName(), type.getSqlIdentifier(), nullable, type.getFieldList(), type.getComparability()); }
@Override public RelDataType getNamedType(SqlIdentifier typeName) { if (typeName.equalsDeep(fixture.addressType.getSqlIdentifier(), Litmus.IGNORE)) { return fixture.addressType; } else { return super.getNamedType(typeName); } }
typeFactory.createArrayType(empRecordType, -1); addressType = new ObjectSqlType(SqlTypeName.STRUCTURED, new SqlIdentifier("ADDRESS", SqlParserPos.ZERO), false,
protected RelDataType canonize(RelDataType type) { type = super.canonize(type); if (!(type instanceof ObjectSqlType)) { return type; } ObjectSqlType objectType = (ObjectSqlType) type; if (!objectType.isNullable()) { objectType.setFamily(objectType); } else { objectType.setFamily( (RelDataTypeFamily) createTypeWithNullability( objectType, false)); } return type; }
/** * Constructs an object type. This should only be called from a factory * method. * * @param typeName SqlTypeName for this type (either Distinct or * Structured) * @param sqlIdentifier identifier for this type * @param nullable whether type accepts nulls * @param fields object attribute definitions */ public ObjectSqlType( SqlTypeName typeName, SqlIdentifier sqlIdentifier, boolean nullable, List<? extends RelDataTypeField> fields, RelDataTypeComparability comparability) { super(typeName, nullable, fields); this.sqlIdentifier = sqlIdentifier; this.comparability = comparability; computeDigest(); }
typeFactory.createArrayType(empRecordType, -1); addressType = new ObjectSqlType(SqlTypeName.STRUCTURED, new SqlIdentifier("ADDRESS", SqlParserPos.ZERO), false,