@SuppressWarnings("deprecation") private RelDataType deriveRowType(RelDataTypeFactory typeFactory) { RelDataTypeFactory.FieldInfoBuilder fieldInfo = typeFactory.builder(); for (ColumnDesc column : sourceColumns) { RelDataType sqlType = createSqlType(typeFactory, column.getUpgradedType(), column.isNullable()); sqlType = SqlTypeUtil.addCharsetAndCollation(sqlType, typeFactory); fieldInfo.add(column.getName(), sqlType); } return typeFactory.createStructType(fieldInfo); }
SqlTypeUtil.addCharsetAndCollation( type, getTypeFactory());
/** * Creates a reference to a given field of the input record. * * @param type Type of field * @param i Ordinal of field * @return Reference to field */ public RexInputRef makeInputRef( RelDataType type, int i) { type = SqlTypeUtil.addCharsetAndCollation(type, typeFactory); return new RexInputRef(i, type); }
/** * Creates a reference to a given field of the input record. * * @param type Type of field * @param i Ordinal of field * @return Reference to field */ public RexInputRef makeInputRef( RelDataType type, int i) { type = SqlTypeUtil.addCharsetAndCollation(type, typeFactory); return new RexInputRef(i, type); }
/** * Creates a reference to a given field of the pattern. * * @param alpha the pattern name * @param type Type of field * @param i Ordinal of field * @return Reference to field of pattern */ public RexPatternFieldRef makePatternFieldRef(String alpha, RelDataType type, int i) { type = SqlTypeUtil.addCharsetAndCollation(type, typeFactory); return new RexPatternFieldRef(alpha, i, type); }
/** * Creates a reference to a given field of the pattern. * * @param alpha the pattern name * @param type Type of field * @param i Ordinal of field * @return Reference to field of pattern */ public RexPatternFieldRef makePatternFieldRef(String alpha, RelDataType type, int i) { type = SqlTypeUtil.addCharsetAndCollation(type, typeFactory); return new RexPatternFieldRef(alpha, i, type); }
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); }
@SuppressWarnings("deprecation") private RelDataType deriveRowType(RelDataTypeFactory typeFactory) { RelDataTypeFactory.FieldInfoBuilder fieldInfo = typeFactory.builder(); for (ColumnDesc column : sourceColumns) { RelDataType sqlType = createSqlType(typeFactory, column.getUpgradedType(), column.isNullable()); sqlType = SqlTypeUtil.addCharsetAndCollation(sqlType, typeFactory); fieldInfo.add(column.getName(), sqlType); } return typeFactory.createStructType(fieldInfo); }
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); }
SqlTypeUtil.addCharsetAndCollation( type, getTypeFactory());
SqlTypeUtil.addCharsetAndCollation( type, getTypeFactory());