public RelDataType createArrayType( RelDataType elementType, long maxCardinality) { assert maxCardinality == -1; ArraySqlType newType = new ArraySqlType(elementType, false); return canonize(newType); }
public RelDataType createSqlIntervalType( SqlIntervalQualifier intervalQualifier) { RelDataType newType = new IntervalSqlType(typeSystem, intervalQualifier, false); return canonize(newType); }
public RelDataType createUnknownType() { return canonize(new UnknownSqlType(this)); }
public RelDataType createMultisetType( RelDataType type, long maxCardinality) { assert maxCardinality == -1; RelDataType newType = new MultisetSqlType(type, false); return canonize(newType); }
public RelDataType createMapType( RelDataType keyType, RelDataType valueType) { MapSqlType newType = new MapSqlType(keyType, valueType, false); return canonize(newType); }
public RelDataType createMapType( RelDataType keyType, RelDataType valueType) { MapSqlType newType = new MapSqlType(keyType, valueType, false); return canonize(newType); }
public RelDataType createMultisetType( RelDataType type, long maxCardinality) { assert maxCardinality == -1; RelDataType newType = new MultisetSqlType(type, false); return canonize(newType); }
public RelDataType createArrayType( RelDataType elementType, long maxCardinality) { assert maxCardinality == -1; ArraySqlType newType = new ArraySqlType(elementType, false); return canonize(newType); }
public RelDataType createSqlIntervalType( SqlIntervalQualifier intervalQualifier) { RelDataType newType = new IntervalSqlType(typeSystem, intervalQualifier, false); return canonize(newType); }
public RelDataType createUnknownType() { return canonize(new UnknownSqlType(this)); }
public RelDataType createSqlType(SqlTypeName typeName) { if (typeName.allowsPrec()) { return createSqlType(typeName, typeSystem.getDefaultPrecision(typeName)); } assertBasic(typeName); RelDataType newType = new BasicSqlType(typeSystem, typeName); return canonize(newType); }
public RelDataType createSqlType( SqlTypeName typeName, int precision, int scale) { assertBasic(typeName); assert (precision >= 0) || (precision == RelDataType.PRECISION_NOT_SPECIFIED); final int maxPrecision = typeSystem.getMaxPrecision(typeName); if (maxPrecision >= 0 && precision > maxPrecision) { precision = maxPrecision; } RelDataType newType = new BasicSqlType(typeSystem, typeName, precision, scale); newType = SqlTypeUtil.addCharsetAndCollation(newType, this); return canonize(newType); }
public RelDataType createSqlType( SqlTypeName typeName, int precision, int scale) { assertBasic(typeName); assert (precision >= 0) || (precision == RelDataType.PRECISION_NOT_SPECIFIED); final int maxPrecision = typeSystem.getMaxPrecision(typeName); if (maxPrecision >= 0 && precision > maxPrecision) { precision = maxPrecision; } RelDataType newType = new BasicSqlType(typeSystem, typeName, precision, scale); newType = SqlTypeUtil.addCharsetAndCollation(newType, this); return canonize(newType); }
public RelDataType createSqlType(SqlTypeName typeName) { if (typeName.allowsPrec()) { return createSqlType(typeName, typeSystem.getDefaultPrecision(typeName)); } assertBasic(typeName); RelDataType newType = new BasicSqlType(typeSystem, typeName); return canonize(newType); }
public RelDataType createTypeWithCharsetAndCollation( RelDataType type, Charset charset, SqlCollation collation) { assert SqlTypeUtil.inCharFamily(type) : type; assert charset != null; assert collation != null; RelDataType newType; if (type instanceof BasicSqlType) { BasicSqlType sqlType = (BasicSqlType) type; newType = sqlType.createWithCharsetAndCollation(charset, collation); } else if (type instanceof JavaType) { JavaType javaType = (JavaType) type; newType = new JavaType( javaType.getJavaClass(), javaType.isNullable(), charset, collation); } else { throw Util.needToImplement("need to implement " + type); } return canonize(newType); }
public RelDataType createSqlType( SqlTypeName typeName, int precision) { final int maxPrecision = typeSystem.getMaxPrecision(typeName); if (maxPrecision >= 0 && precision > maxPrecision) { precision = maxPrecision; } if (typeName.allowsScale()) { return createSqlType(typeName, precision, typeName.getDefaultScale()); } assertBasic(typeName); assert (precision >= 0) || (precision == RelDataType.PRECISION_NOT_SPECIFIED); RelDataType newType = new BasicSqlType(typeSystem, typeName, precision); newType = SqlTypeUtil.addCharsetAndCollation(newType, this); return canonize(newType); }
public RelDataType createSqlType( SqlTypeName typeName, int precision) { final int maxPrecision = typeSystem.getMaxPrecision(typeName); if (maxPrecision >= 0 && precision > maxPrecision) { precision = maxPrecision; } if (typeName.allowsScale()) { return createSqlType(typeName, precision, typeName.getDefaultScale()); } assertBasic(typeName); assert (precision >= 0) || (precision == RelDataType.PRECISION_NOT_SPECIFIED); RelDataType newType = new BasicSqlType(typeSystem, typeName, precision); newType = SqlTypeUtil.addCharsetAndCollation(newType, this); return canonize(newType); }
public RelDataType createTypeWithCharsetAndCollation( RelDataType type, Charset charset, SqlCollation collation) { assert SqlTypeUtil.inCharFamily(type) : type; assert charset != null; assert collation != null; RelDataType newType; if (type instanceof BasicSqlType) { BasicSqlType sqlType = (BasicSqlType) type; newType = sqlType.createWithCharsetAndCollation(charset, collation); } else if (type instanceof JavaType) { JavaType javaType = (JavaType) type; newType = new JavaType( javaType.getJavaClass(), javaType.isNullable(), charset, collation); } else { throw Util.needToImplement("need to implement " + type); } return canonize(newType); }
@Override public RelDataType createTypeWithNullability( final RelDataType type, final boolean nullable) { final RelDataType newType; if (type instanceof BasicSqlType) { newType = ((BasicSqlType) type).createWithNullability(nullable); } else if (type instanceof MapSqlType) { newType = copyMapType(type, nullable); } else if (type instanceof ArraySqlType) { newType = copyArrayType(type, nullable); } else if (type instanceof MultisetSqlType) { newType = copyMultisetType(type, nullable); } else if (type instanceof IntervalSqlType) { newType = copyIntervalType(type, nullable); } else if (type instanceof ObjectSqlType) { newType = copyObjectType(type, nullable); } else { return super.createTypeWithNullability(type, nullable); } return canonize(newType); }
@Override public RelDataType createTypeWithNullability( final RelDataType type, final boolean nullable) { RelDataType newType; if (type instanceof BasicSqlType) { BasicSqlType sqlType = (BasicSqlType) type; newType = sqlType.createWithNullability(nullable); } else if (type instanceof MapSqlType) { newType = copyMapType(type, nullable); } else if (type instanceof ArraySqlType) { newType = copyArrayType(type, nullable); } else if (type instanceof MultisetSqlType) { newType = copyMultisetType(type, nullable); } else if (type instanceof IntervalSqlType) { newType = copyIntervalType(type, nullable); } else if (type instanceof ObjectSqlType) { newType = copyObjectType(type, nullable); } else { return super.createTypeWithNullability(type, nullable); } return canonize(newType); }