ClickHouse / ClickHouse/clickhouse-java
Regression in JDBC 0.9.8 when reading Array(Tuple(...)) with named tuple elements.
- 主要语言
- Java
- 星标
- 1.6k
- 派生
- 636
- 平均合并
- 2 天 23 小时
- 30 天内合并 PR
- 29
描述
## Description
Regression in JDBC 0.9.8 when reading Array(Tuple(...)) with named tuple elements.
With the official ClickHouse JDBC driver 0.9.8, IntelliJ IDEA displays Array(Tuple(id UUID)) values as:
`com.clickhouse.jdbc.types.Array@54c3b772`
instead of the array contents.
The same query works correctly with JDBC 0.6.0.
The issue only affects named tuples. Arrays of unnamed tuples are displayed correctly.
### Steps to reproduce
1. Connect to ClickHouse using clickhouse-jdbc:0.9.8.
2. Execute `SELECT [('550e8400-e29b-41d4-a716-446655440000')];` Result is displayed correctly.
3. Execute `SELECT [('550e8400-e29b-41d4-a716-446655440000')::Tuple(id UUID)];` Result is displayed as com.clickhouse.jdbc.types.Array@...
### Error Log or Exception StackTrace
No exception is thrown.
The value is rendered as:
```
com.clickhouse.jdbc.types.Array@54c3b772
```
### Expected Behaviour
Array(Tuple(id UUID)) should be returned through JDBC in a way that clients can display its contents, the same as in JDBC 0.6.0 and the same as Array(Tuple(UUID))
### Code Example
```sql
SELECT [('550e8400-e29b-41d4-a716-446655440000')];
SELECT [('550e8400-e29b-41d4-a716-446655440000')::Tuple(id UUID)];
```
### Configuration
#### Client Configuration
Default JDBC configuration.
```java
```
#### Environment
* [ ] Cloud
* Client version: clickhouse-jdbc 0.9.8
* Language version: N/A (observed in IntelliJ Database Viewer)
* OS: macOS
* IDE: IntelliJ IDEA 2026.2.0.1
#### ClickHouse Server
* ClickHouse Server version: 26.3.17.56
* ClickHouse Server non-default settings, if any: None
* `CREATE TABLE` statements for tables involved: Not required (reproducible with literal values only)
* Sample data for all these tables, use [clickhouse-obfuscator](https://github.com/ClickHouse/ClickHouse/blob/master/programs/obfuscator/Obfuscator.cpp#L42-L80) if necessary
It is unclear whether this is a JDBC driver regression or an incompatibility with IntelliJ’s database viewer, but the behavior changed between JDBC 0.6.0 and 0.9.8 and is reproducible with the SQL above.
贡献指南
调研方向
先使用 clickhouse-jdbc 0.9.8 重现两个 SQL 查询,然后将返回的 Array(Tuple(...)) 值与 JDBC 0.6.0 以及未命名元组的情况进行比较。检查是驱动程序还是 IntelliJ Database Viewer 控制渲染;当命名元组数组以与预期情况一致的方式公开其内容时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- database
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 52/100