Closed ne1r0n closed 1 year ago
Thanks @ne1r0n for reporting the issue. I can reproduce the same issue on latest DBeaver but it works in other DB client like SQuirreL SQL.
Behind the scene, by default JDBC driver maps UInt64 to Java long
so you may see negative value when calling ResultSet.getLong()
but you should really call ResultSet.getObject()
or ResultSet.getBigDecimal()
instead.
In refactored version, I added Unsigned* classes for unsigned data types(e.g. com.clickhouse.client.data.UnsignedLong
for UInt64). This was mainly to fix type conversion issues but it may resolve the display issue in most database clients using the driver as well(DataGrip now shows correct result and same for DBeaver).
The issue has been fixed in JDBC driver, but it looks like DBeaver has display issue - dbeaver/dbeaver#20014
Driver version v0.3.2-patch11
Selecting some huge numbers gives incorrect results. For example:
SELECT toUInt64(15369343623947579499) a, toNullable(15369343623947579499) b;
in dBeaver:
in DataGrip: