I just stumbled on this buried treasure in OracleDialect:
case Types.DECIMAL:
if ( scale == 0 ) {
switch ( precision ) {
case 1:
return jdbcTypeRegistry.getDescriptor( Types.BOOLEAN );
Of course, precision==1 means one decimal digit of precision, not one bit. Now, just by pure luck, this doesn’t break anything because in Oracle pre-23c, we map BOOLEAN to number(1,0), but by the same token that whole block of code looks just completely pointless. I believe it should be deleted. |