public String getTypeName(int code, int length, int precision, int scale)
            throws HibernateException {
        /*
         * We might want a special case for 19,2. This is very common for money
         * types and here it is converted to 18,1
         */
        float f = precision > 0 ? (float) scale / (float) precision : 0;
        int p = (precision > 18 ? 18 : precision);
        int s = (precision > 18 ? (int) (18.0 * f) : (scale > 18 ? 18 : scale));

        return super.getTypeName(code, length, p, s);
    }
Get the name of the database type associated with the given
{@code java.sql.Types} typecode.

@param code
           {@link java.sql.Types} typecode
@param length
           the length or precision of the column
@param precision
           the precision of the column
@param scale
           the scale of the column

@return the database type name

@throws HibernateException
querydsl-jpa/src/test/java/com/querydsl/jpa/support/TeradataDialect.java