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
bugclientModule: the client (client-v2; with legacy: the v1 client)queriesArea: how the client builds and runs statements (parameters, quoting, batches)
In client-v2, passing a List/array/Map value as a server-side query parameter emits the inner elements unquoted, so ClickHouse rejects the request. For example a List<LocalDate> bound to {x:Array(Date)} is sent as param_x=[2026-05-13] instead of param_x=['2026-05-13'], and the server returns HTTP 400:
Scalar parameters are unaffected (a scalar Date is correctly sent unquoted). Only container parameters — Array(...), Map(...), and nested combinations — whose leaves are String/temporal values are affected.
Root cause
client-v2/src/main/java/com/clickhouse/client/api/internal/HttpAPIClientHelper.java, in addStatementParams:
String.valueOf(List<LocalDate>) calls AbstractCollection.toString(), which formats each element via its own toString() (LocalDate → 2026-05-13, no quotes) and yields [2026-05-13]. ClickHouse's array text parser for Array(Date) requires single-quoted dates (['2026-05-13']), so it fails. The same applies to Array(String), Array(DateTime), Map(String, Date), and nested containers. Numeric arrays (Array(Int32), Array(Decimal)) must stay unquoted, so the fix must be type-aware, not a blanket quote.
Current workaround: pre-format the value with DataTypeConverter.INSTANCE.arrayToString(list, "Array(Date)") before binding.
Cross-language note
Same bug class as clickhouse-connect issue #188 (Python): a server-side parameter formatter not recursively quoting inner temporal/String values. Root cause is client-side value formatting for the HTTP param_* path, not the wire protocol.
bugclientModule: the client (client-v2; with legacy: the v1 client)queriesArea: how the client builds and runs statements (parameters, quoting, batches)
Activity
chernser commentedon Jul 8, 2026
Related to #2407
Fix client-v2: quote String/temporal elements in container query para…