return val != null ? TypeId.SMALLINT_MAXWIDTH : 0;
case Types.BIGINT:
return val != null ? TypeId.LONGINT_MAXWIDTH: 0;
case Types.DECIMAL:
if (val != null) {
SQLDecimal constantDecimal = new SQLDecimal((BigDecimal) val);
int precision = constantDecimal.getDecimalValuePrecision();
int scal = constantDecimal.getDecimalValueScale();
/* be consistent with our convention on maxwidth, see also
* exactNumericType(), otherwise we get format problem, b 3923
*/
return DataTypeUtilities.computeMaxWidth(precision, scal);
} else {