Skip to main content

ClickHouse client

Java client is a library implementing own API that abstracts details of network communications with ClickHouse server. Currently HTTP Interface is supported only. The library provide utilities to work with different ClickHouse formats and other related functions. Java Client was developed far back in 2015. Its codebase became very hard to maintain, API is confusing, it is hard to optimize it further. So we have refactored it in 2024 into a new component client-v2. It has clear API, lighter codebase and more performance improvements, better ClickHouse formats support (RowBinary & Native mainly). JDBC will use this client in near feature.

Supported data types

ClickHouse Data Types
Partial support
  • AggregateFunction — Only groupBitmap is supported for direct binary reads. For other aggregate functions (min, max, avg, etc.), use -Merge combinators in your query (e.g., minMerge(), avgMerge()) to resolve the state server-side. SELECT * FROM table ... is not supported for columns with AggregateFunction type.
Data type notes
  • DecimalSET output_format_decimal_trailing_zeros=1 in 21.9+ for consistency.
  • Enum — can be treated as both string and integer.
  • UInt64 — mapped to long in client-v1.

Features

Table of features of the clients: JDBC Drive inherits same features as underlying client implementation. Other JDBC features are listed on its page.

Compatibility

  • All projects in this repo are tested with all active LTS versions of ClickHouse.
  • Support policy
  • We recommend to upgrade client continuously to not miss security fixes and new improvements
  • If you have an issue with migration to v2 API - create an issue and we will respond!

Logging

Our Java language client uses SLF4J for logging. You can use any SLF4J-compatible logging framework, such as Logback or Log4j. For example, if you’re using Maven you could add the following dependency to your pom.xml file:
pom.xml

Configuring logging

This is going to depend on the logging framework you’re using. For example, if you’re using Logback, you could configure logging in a file called logback.xml:
logback.xml
Changelog
Last modified on June 23, 2026