public int getFractionalSecondPrecision(RelDataTypeSystem typeSystem) { if (fractionalSecondPrecision == RelDataType.PRECISION_NOT_SPECIFIED) { return typeName().getDefaultScale(); } else { return fractionalSecondPrecision; } }
public int getFractionalSecondPrecision(RelDataTypeSystem typeSystem) { if (fractionalSecondPrecision == RelDataType.PRECISION_NOT_SPECIFIED) { return typeName().getDefaultScale(); } else { return fractionalSecondPrecision; } }
printPrecision = true; if (typeName.getDefaultScale() > -1) { printScale = true;
printPrecision = true; if (typeName.getDefaultScale() > -1) { printScale = true;
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); }
assertThat(typeName.getMinScale(), is(1)); assertThat(typeSystem.getMaxScale(typeName), is(9)); assertThat(typeName.getDefaultScale(), is(6));
assertThat(typeName.getMinScale(), is(1)); assertThat(typeSystem.getMaxScale(typeName), is(9)); assertThat(typeName.getDefaultScale(), is(6));