This is correct for the SQL standard type precedence as implemented in sql-parser/DataTypeDescriptor#getDominantType(). So existing type casting.