clickhouse-java icon indicating copy to clipboard operation
clickhouse-java copied to clipboard

Unsupported data type: BFloat16

Open tolberg91 opened this issue 7 months ago • 2 comments

Hi

I created a table with a column of type BFloat16 ( https://clickhouse.com/docs/ru/sql-reference/data-types/float ). And now I am trying to read this table with jdbc driver (version 0.8.5, https://mvnrepository.com/artifact/com.clickhouse/clickhouse-jdbc/0.8.5 ) but I am getting a error: Unsupported data type: BFloat16

Is there a reason, or is it an oversight?

Stacktrace: Exception in thread "main" java.lang.RuntimeException: java.sql.SQLException: Failed to read value for column column_bfloat at com.abc.MyService.main(MyService.java:45) Caused by: java.sql.SQLException: Failed to read value for column column_bfloat at com.clickhouse.jdbc.internal.ExceptionUtils.toSqlState(ExceptionUtils.java:69) at com.clickhouse.jdbc.internal.ExceptionUtils.toSqlState(ExceptionUtils.java:42) at com.clickhouse.jdbc.ResultSetImpl.next(ResultSetImpl.java:105) at com.abc.MyService.main(MyService.java:24) Caused by: com.clickhouse.client.api.ClientException: Failed to read value for column column_bfloat at com.clickhouse.client.api.data_formats.internal.BinaryStreamReader.readValue(BinaryStreamReader.java:246) at com.clickhouse.client.api.data_formats.internal.BinaryStreamReader.readValue(BinaryStreamReader.java:82) at com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader.readRecord(AbstractBinaryFormatReader.java:175) at com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader.next(AbstractBinaryFormatReader.java:245) at com.clickhouse.jdbc.ResultSetImpl.next(ResultSetImpl.java:103) ... 1 more Caused by: java.lang.IllegalArgumentException: Unsupported data type: BFloat16 at com.clickhouse.client.api.data_formats.internal.BinaryStreamReader.readValue(BinaryStreamReader.java:240) ... 5 more

tolberg91 avatar May 05 '25 07:05 tolberg91

duplicate of https://github.com/ClickHouse/clickhouse-java/issues/2279

mshustov avatar May 05 '25 14:05 mshustov

Good day, @tolberg91!

Thank you for the reporting! We aware of the issue.

chernser avatar May 05 '25 16:05 chernser