ClickHouse / ClickHouse/clickhouse-java

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

Aperta
#3,059 2 commenti 1 reazione 0 assegnatari Vedi su GitHub
area:general client-api-v2 enhancement
Lingua principale
Java
Stelle
1.6k
Fork
636
Merge medio
2g 23h
PR unite (30g)
29

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start with the client-v2 ClientConfigProperties enum and jdbc-v2's Driver.getPropertyInfo(url, info) entry point, then trace how current keys, types, and defaults are defined. Completion should provide structured metadata for plain client-v2, cover dynamic prefixes and requested flags, and keep the JDBC property information consistent.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
api, developer-experience
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.