You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error to cast String or BigInt when the column type is UInt64/Int128/UInt128/Int256/UInt256 on Nifi #2779
Failed to put Records to database for FlowFile[filename=c797411d-7c71-4403-9f92-e204c26849a2]. Routing to failure.: java.io.IOException: Unable to setObject() with value 20260219145041580000000000403034240 at index 208 of type 1111
Caused by: java.sql.SQLException: Cannot convert OTHER to a ClickHouse one. Consider using java.sql.JDBCType or com.clickhouse.data.ClickHouseDataType
Expected Behaviour
Insertion is functionnal in case of cdc_changesequence is typed as String or BigInt
com.clickhouse.jdbc.JdbcTypeMapping:
public int toSqlType : .......
case UInt64:
case Int128:
case UInt128:
case Int256:
case UInt256:
sqlType = Types.NUMERIC;
break;
com.clickhouse.jdbc.JdbcTypeMapping:
public int toSqlType : .......
case UInt64:
case Int128:
case UInt128:
case Int256:
case UInt256:
sqlType = Types.NUMERIC;
break;
For V2, I haven’t tested it yet, but I believe we need to apply the same logic (to be verified)
Activity
chernser commentedon Mar 5, 2026
@HanchiMed
thank you for reporting this!
What version of the driver do you use?
Is it V1 or V2?
Thanks!
HanchiMed commentedon Mar 5, 2026
Hello,
I used the V1 and the fix is working.
com.clickhouse.jdbc.JdbcTypeMapping:
public int toSqlType : .......
case UInt64:
case Int128:
case UInt128:
case Int256:
case UInt256:
sqlType = Types.NUMERIC;
break;
For V2, I haven’t tested it yet, but I believe we need to apply the same logic (to be verified)
com.clickhouse.jdbc.internal.JdbcUtils:
private static Map<ClickHouseDataType, SQLType> generateTypeMap() { ...........
map.put(ClickHouseDataType.Int128, JDBCType.NUMERIC);
map.put(ClickHouseDataType.Int256, JDBCType.NUMERIC);
map.put(ClickHouseDataType.UInt64, JDBCType.NUMERIC);
map.put(ClickHouseDataType.UInt128, JDBCType.NUMERIC);
map.put(ClickHouseDataType.UInt256, JDBCType.NUMERIC);
Regards
chernser commentedon Mar 5, 2026
@HanchiMed
thank you!
In support for your fix https://groups.google.com/g/firebird-java/c/g3xZLhIs15Y
This is a valid point.
V1 previously mapped everything to BigDecimal what is not correct.
V2 use OTHER as indicator for an user to use
getObject()