ClickHouse / ClickHouse/clickhouse-java

Regression in JDBC 0.9.8 when reading Array(Tuple(...)) with named tuple elements.

Đang mở
#3,045 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:data-type area:jdbc-read bug jdbc-v2
Ngôn ngữ chính
Java
Star
1.6k
Fork
636
Merge trung bình
2 ngày 23 giờ
Pull request đã merge (30 ngày)
29

Mô tả

## 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start by reproducing the two SQL queries with clickhouse-jdbc 0.9.8, then compare the returned Array(Tuple(...)) value with JDBC 0.6.0 and the unnamed-tuple case. Check whether the driver or IntelliJ Database Viewer controls rendering; done means named tuple arrays expose their contents consistently with the expected cases.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
database
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
52/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.