Skip to content

Insert Fails for Array(Tuple) in JDBC v2 (Worked in v1) #2360

@aira-xite

Description

@aira-xite

We previously encountered a similar issue (#1862), and the suggested solution worked at that time. However, after migrating to jdbc-v2 (version 0.8.4), the same approach no longer works.

Currently, we're attempting to insert data into a column of type Array(Tuple(String, String)) using the method recommended in this comment, but the operation now fails with the following error:

Failed to create array
java.sql.SQLException: 
	at com.clickhouse.jdbc.ConnectionImpl.createArrayOf(ConnectionImpl.java:515)
	at com.zaxxer.hikari.pool.HikariProxyConnection.createArrayOf(HikariProxyConnection.java)
.....
.....
Caused by: java.lang.IllegalArgumentException: No enum constant com.clickhouse.data.ClickHouseDataType.Tuple(String, String)
	at java.base/java.lang.Enum.valueOf(Enum.java:273)
	at com.clickhouse.data.ClickHouseDataType.valueOf(ClickHouseDataType.java:50)
	at com.clickhouse.jdbc.ConnectionImpl.createArrayOf(ConnectionImpl.java:513)
	at com.zaxxer.hikari.pool.HikariProxyConnection.createArrayOf(HikariProxyConnection.java)

This used to work on 0.7.2 and jdbc-v1. Is there an updated way to insert an Array(Tuple(String, String)) column using jdbc-v2?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions