You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
Fixes format selection so a query-level FORMAT clause can override the client-set format, motivated by an upcoming ClickHouse (26.8+) change in the priority of the X-ClickHouse-Format header vs. the FORMAT clause (issue #3086). The default format (RowBinaryWithNamesAndTypes) moves from being hardcoded per-operation in Client.query() to a client-level config default (INPUT_OUTPUT_FORMAT), which users can now clear (empty/nullformat=) to omit the format header entirely. Adds ClickHouseFormat.fromString() (case-insensitive, null-tolerant) in clickhouse-data, a new Client.Builder.queryFormat(String) API that passes unknown format names through as raw strings, null-safe header emission in HttpAPIClientHelper, null-format handling in jdbc-v2 StatementImpl, and pins RowBinaryWithNamesAndTypes on every internal DatabaseMetaDataImpl statement so metadata works regardless of the connection's format property. Docs, CHANGELOG, and unit/integration tests are updated.
What this impacts
clickhouse-data — new ClickHouseFormat.fromString() static (type-system package)
client-v2 — default-format resolution, new queryFormat builder API, config parsing (parseValue/parseConfigMap), HTTP format header emission
jdbc-v2 — StatementImpl reader selection on null format, all DatabaseMetaData internal queries
User-facing: connection/client format setting semantics, format of query responses
Concerns
Multiple High rules fire: changes in com.clickhouse.data (type system), cross-module change spanning clickhouse-data/client-v2/jdbc-v2, and diff size ~600 changed lines (>400) — consider reviewing in parts (data-format helper, client-v2 config/default change, jdbc-v2 metadata pinning).
Behavioral change without a feature flag: default format now applied at client config level, and format= empty legitimately breaks JDBC statements lacking a FORMAT clause (server falls back to TabSeparated) — documented, but a compatibility surface per docs/features.md.
ClientConfigProperties.parseValue now matches all enums case-insensitively and parseConfigMap silently drops null parsed values — broader than the format fix; possible unintended effect on other enum-typed settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes: #3086
Checklist
Delete items not relevant to your PR: