-
Notifications
You must be signed in to change notification settings - Fork 614
Closed
Description
Describe the bug
When i try to register my model:
client.register(MyTable::class.java, client.getTableSchema("myTable"))
i get:
Column type 'Bool' cannot be set to a primitive type 'boolean'
Steps to reproduce
1.Create a kotlin data class:
data class MyTable(
var isBool: Boolean,
)
- try to register this table:
client.register(MyTable::class.java, client.getTableSchema("myTable"))
- get the error
Expected behaviour
it works
Error log
at com.clickhouse.client.api.data_formats.internal.SerializerUtils.binaryReaderMethodForType(SerializerUtils.java:955) ~[client-v2-0.8.2.jar:client-v2 0.8.2 (revision: 1414421)]
at com.clickhouse.client.api.data_formats.internal.SerializerUtils.compilePOJOSetter(SerializerUtils.java:841) ~[client-v2-0.8.2.jar:client-v2 0.8.2 (revision: 1414421)]
at com.clickhouse.client.api.Client.register(Client.java:1235) ~[client-v2-0.8.2.jar:client-v2 0.8.2 (revision: 1414421)]
at com.infrago.configs.ClickhouseConfiguration.clickhouseClient(ClickhouseConfiguration.kt:32) ~[main/:na]
Configuration
val client = Client.Builder()
.addEndpoint(clickhouseUrl)
.setUsername(clickhouseUsername)
.setPassword(clickhousePassword)
.setMaxConnections(100)
.setLZ4UncompressedBufferSize(1058576)
.setSocketRcvbuf(500000)
.setSocketTcpNodelay(true)
.setSocketSndbuf(500000)
.setClientNetworkBufferSize(500000)
.allowBinaryReaderToReuseBuffers(true)
.setDefaultDatabase(clickhouseDatabase)
.build()
Environment
- Client version:
com.clickhouse:client-v2:0.8.2 - Language version:
kotlin - java - OS:
wsl on windows 11
ClickHouse server
- ClickHouse Server version:
v25.4.1.656 - ClickHouse Server non-default settings, if any: no
CREATE TABLEstatements for tables involved:
CREATE TABLE myTable
(
isBool Bool,
) ENGINE = MergeTree()
ORDER BY (isBool);