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
Failed to set value at index: 0 value [Ljava.lang.Object;@adcfad9 of class [Ljava.lang.Object;
java.lang.IllegalArgumentException: Failed to set value at index: 0 value [Ljava.lang.Object;@adcfad9 of class [Ljava.lang.Object;
at com.clickhouse.client.api.data_formats.internal.BinaryStreamReader$ArrayValue.set(BinaryStreamReader.java:580)
at com.clickhouse.client.api.data_formats.internal.BinaryStreamReader.readArray(BinaryStreamReader.java:534)
at com.clickhouse.client.api.data_formats.internal.BinaryStreamReader.readValue(BinaryStreamReader.java:209)
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:130)
at com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader.readNextRecord(AbstractBinaryFormatReader.java:176)
at com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader.hasNext(AbstractBinaryFormatReader.java:165)
at my.service.clickhouse.ClickHouseClientIntegrationTest.groupUniqArrayTuple(ClickHouseClientIntegrationTest.java:120)
...
Caused by: java.lang.IllegalArgumentException: array element type mismatch
at java.base/java.lang.reflect.Array.set(Native Method)
at com.clickhouse.client.api.data_formats.internal.BinaryStreamReader$ArrayValue.set(BinaryStreamReader.java:577)
...
Configuration
Environment
Client version: 0.7.0
Language version: Java 11
OS: MacOS Sonoma 14.6
ClickHouse server
ClickHouse Server version: 24.9.2.42
CREATE TABLE statements for tables involved:
CREATE TABLE users(id Int64, name String, surname String) ENGINE = ReplacingMergeTree PRIMARY KEY (id) ORDER BY (id);
Describe the bug
We are encountering an IllegalArgumentException when reading response from query, containing groupUniqArray function with Tuples.
Steps to reproduce
RowBinaryWithNamesAndTypes
query containing groupUniqArray function with Tuples, e.g.Client.newBinaryFormatReader
(also tried usingCSVWithNames
andClient.queryRecords
)(See full stack trace below)
Expected behaviour
Expected for query to work.
Code example
Here's a complete integration test demonstrating the problem. Workaround is to replace Tuple with Array:
groupUniqArray([id, name])
Error log
Configuration
Environment
ClickHouse server
CREATE TABLE
statements for tables involved:The text was updated successfully, but these errors were encountered: