Skip to content

[JAVA] Update JDBC docs#6297

Open
chernser wants to merge 2 commits into
mainfrom
05/27/26/java_update_jdbc_mapping
Open

[JAVA] Update JDBC docs#6297
chernser wants to merge 2 commits into
mainfrom
05/27/26/java_update_jdbc_mapping

Conversation

@chernser
Copy link
Copy Markdown
Contributor

@chernser chernser commented May 28, 2026

Summary

  • Updates type mapping for V2
  • Adds explanation of V2 array base type mapping
  • Updates migration difference.

Closes: ClickHouse/clickhouse-java#2746

Checklist


Note

Low Risk
Documentation-only changes to jdbc.mdx; no runtime, security, or API code is modified.

Overview
Updates the Java JDBC integration docs to match JDBC V2 type metadata and migration guidance.

Type mapping tables now list standard JDBC type codes (e.g. TINYINT (-6), VARCHAR (12)) alongside type names. Scalar mappings are corrected for V2: wide integers and UInt64 use NUMERIC instead of OTHER; unsigned integers map to signed JDBC numeric types with standard Java boxed types; Float32 is FLOAT not REAL; Enum8/Enum16 are VARCHAR.

A new Array element type metadata section documents Array.getBaseTypeName() / getBaseType() for V2, including nested Nullable, LowCardinality, Tuple, UUID, and multi-dimensional arrays, and notes that V2 keeps full ClickHouse type signatures where V1 strips them.

The V1 vs V2 migration tables are aligned with the same JDBC/Java class changes (unsigned types, NUMERIC, FLOAT, and V1 DateTime/DateTime64 as TIMESTAMP_WITH_TIMEZONE with OffsetDateTime).

Reviewed by Cursor Bugbot for commit 0ec4b5b. Bugbot is set up for automated code reviews on this repo. Configure here.

@chernser chernser requested review from a team as code owners May 28, 2026 00:25
@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clickhouse-docs Ready Ready Preview, Comment May 28, 2026 12:38am
4 Skipped Deployments
Project Deployment Actions Updated (UTC)
clickhouse-docs-jp Ignored Ignored May 28, 2026 12:38am
clickhouse-docs-ko Ignored Ignored May 28, 2026 12:38am
clickhouse-docs-ru Ignored Ignored May 28, 2026 12:38am
clickhouse-docs-zh Ignored Ignored May 28, 2026 12:38am

Request Review

@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 28, 2026

Docs PR opened: ClickHouse/mintlify-docs-dev#89

Updated the Java JDBC docs with V2 type codes, revised type mappings, and a new Array element metadata section.

Once this PR is merged, we'll do a second pass to capture any additional changes and update the docs PR.

| Decimal256 | DECIMAL | java.math.BigDecimal |
| Bool | BOOLEAN | java.lang.Boolean |
| Int8 | TINYINT (-6) | java.lang.Byte |
| Int16 | SMALLINT (5) | java.lang.Short |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it precision or a constant? the column legend doesn't tell much


**JDBC V2**

| ClickHouse Type (Example) | `getBaseTypeName()` | `getBaseType()` |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd vote to move Example to a separate column since it's hard to read (at least in markdown)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[jdbc-v2] Make Driver type system more compatible with JDBC standard types

3 participants