ClickHouse / ClickHouse/clickhouse-java

[client-v2] Expose supported configuration options via a public API

Đang mở
#3,059 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
area:general client-api-v2 enhancement
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ả

## Is your feature request related to a problem?

Connectors and tools built on top of the Java client (e.g. Kafka Connect sink, Spark connector, ingestion frameworks, config-validation UIs) need to know which configuration options the client supports so they can expose, validate, and document them programmatically. Today there is no supported API call to retrieve this list:

- `ClientConfigProperties` (client-v2) is a public enum, but it only carries the option key, value type, and default value — no human-readable description, no allowed-value/choices metadata, and no indication of whether an option is required or deprecated.
- jdbc-v2 implements `Driver.getPropertyInfo(url, info)` returning `DriverPropertyInfo[]`, but that is JDBC-specific and not usable from plain client-v2.

## Describe the solution you'd like

A public API on the client (e.g. `Client.getSupportedOptions()` or a static method on `ClientConfigProperties`) that returns structured metadata for every supported option:

- option key (e.g. `connect_timeout`)
- value type
- default value
- description
- allowed values / choices where applicable
- flags such as required, deprecated, sensitive (e.g. `password`, so tools know to mask it)

This would let integrators generate their config surface directly from the client instead of hard-coding option lists that drift out of date. Ideally jdbc-v2's `getPropertyInfo` would be backed by the same metadata source so the two stay consistent.

## Describe alternatives you've considered

- Iterating `ClientConfigProperties.values()` via the enum — works for key/type/default but lacks descriptions and semantic metadata, and does not cover dynamic prefixes (`clickhouse_setting_*`, `http_header_*`).
- Scraping the docs — brittle and not machine-friendly.

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

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

Hướng nghiên cứu

Bắt đầu với enum ClientConfigProperties của client-v2 và entry point Driver.getPropertyInfo(url, info) của jdbc-v2, sau đó lần theo cách các key, type và default hiện tại được định nghĩa. Phần hoàn thành cần cung cấp metadata có cấu trúc cho plain client-v2, bao quát các prefix động và các flag được yêu cầu, đồng thời giữ cho thông tin thuộc tính JDBC nhất quán.

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
api, developer-experience
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/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.