ClickHouse / clickhouse-java

ClickHouse Java Clients & JDBC Driver
https://clickhouse.com
Apache License 2.0
1.45k stars 535 forks source link

How to create a ClickHouseTupleValue? #1860

Closed joceron closed 1 month ago

joceron commented 1 month ago

My end goal is to execute ClickHouseRowBinaryProcessor.TupleSerializer.serialize, but I always get an IndexOutOfBoundsException because ClickHouseTupleValue seems to always merge all the values together when creating it.

I tried:

I tried to access the second constructor of ClickHouseTupleValue:

public static ClickHouseTupleValue of(ClickHouseValue ref, List<Object> value)

But it always seems to go into the first one no matter what:

public static ClickHouseTupleValue of(Object... value)

Am I doing something wrong? Or how can I reach a situation where ClickHouseTupleValue.asTuple() returns anything with a size > 1?