Skip to content

Releases: ClickHouse/clickhouse-java

Release v0.3.2-patch1

08 Jan 23:27
75a6aa6

Choose a tag to compare

This is a patch release for fixing NullPointException in JDBC driver when getting null date/datetime values from ResultSet - see #797.

Java client does not have the issue, so you can continue to use 0.3.2.

commits...
  • [0dccb76]: Fix NullPointerException (lin.chen) #797
  • [48893a2]: Add test for nullable date and datetime values (Zhichun Wu) #798
  • [be3a8ff]: Bump 3rd party dependencies (Zhichun Wu) #798
  • [8bc91d0]: Bump version and dependencies (Zhichun Wu) #800
  • [b2805fd]: Make grpc client less annonying and increase overall timeout by adding socket timeout (Zhichun Wu) #800
  • [6f4b879]: Add examples (Zhichun Wu) #800

Release v0.3.2

30 Dec 10:14
1795272

Choose a tag to compare

Despite from the version number and unusually long release cycle, this is a complete re-write. This means it's not a drop-in replacement of previous versions, and it may surprise you in certain cases. However, it's highly recommended to start integrating the new JDBC driver and Java client, not only for more features but also better performance - please refer to #768 for details.

  • KNOWN ISSUES

    • new driver com.clickhouse.jdbc.ClickHouseDriver does not work with version before 20.7
    • java.io.IOException: HTTP/1.1 header parser received no bytes when using JDK 11+ and http_connection_provider is set to HTTP_CLIENT
    • RESOURCE_EXHAUSTED: Compressed gRPC message exceeds maximum size when use gRPC - please increase max_inbound_message_size
    • select 1 format JSON works in http but not grpc, because grpc client is not aware of response format
    • gRPC is "slow" by default because it uses gzip instead of lz4 - see ClickHouse/ClickHouse#28671
    • many connection properties are gone - please use custom_http_params and maybe custom_http_headers instead
    • NPE when query null Date/DateTime - see #797 (will be fixed in 0.3.2-patch1)
  • NEW FEATURES

    • Java client and JDBC driver are now in different modules
    • Replaced data format from TabSeparated to RowBinary
    • Support both HTTP and gRPC - Native/TCP will be available in next release
    • Support more data types including Bool, Date32, Geo types, and mixed use of nested types(e.g. array of tuples)
    • Enhanced pipeline for better performance and less memory footprints - still plenty of room to improve according to ranking here
    • More JDBC APIs(especially those related to metadata) are implemented
    • Better date time and time zone support
  • BUG FIXES

    • stale connection validation to mitigate failed to respond issue
    • parsing NaN and Inf/-Inf
commits...
  • [e6205b4]: Use jdk 11 to build (Zhichun Wu) #735
  • [007d167]: Initial import of the new client (Zhichun Wu) #736
  • [43dff6d]: Fix build break (Zhichun Wu) #736
  • [9686cd4]: Discard known issues when testing against CH older than 21.9 (Zhichun Wu) #736
  • [aea7d4b]: Fix maven build warnings (Zhichun Wu) #737
  • [f66139a]: Remove groupId declaration for consistency (Zhichun Wu) #737
  • [77e67bc]: Skip negative test of DateTime/DateTime32 on 21.3 (Zhichun Wu) #737
  • [85c3bcf]: Only compares year and major version (Zhichun Wu) #737
  • [7f505be]: Skip failed cases in certain releases (Zhichun Wu) #737
  • [d5c72b0]: Limit timezone testing to JDBC driver (Zhichun Wu) #738
  • [32ca307]: Add simple cache mechanism based on Caffeine and LinkedHashMap (Zhichun Wu) #739
  • [19f0c9d]: Support maven-like version range (Zhichun Wu) #739
  • [1eb0753]: Apply version range change and enhance DNS resolver (Zhichun Wu) #739
  • [6015f67]: replace Jackson to Gson (Zhichun Wu) #740
  • [7e3fc8f]: Remove slf4j dependency from JDBC driver (Zhichun Wu) #741
  • [a8ac5b2]: Restore readUnsignedLeb128 method as requested in #710 (Zhichun Wu) #742
  • [4f93201]: support credentials and protocol (Zhichun Wu) #742
  • [cd32678]: Downgrade to JDK8 API (Zhichun Wu) #742
  • [9b23915]: prepare jdbc refactoring (Zhichun Wu) #746
  • [2bf54d8]: Bump 3rd party libs (Zhichun Wu) #746
  • [d09d385]: Primitive array, serializable option, and shaded jars (Zhichun Wu) #747
  • [dae6fdd]: ClickHouseRecord no long throws IOException and add its default implementation (Zhichun Wu) #747
  • [6d18204]: Simplify response and error handling (Zhichun Wu) #747
  • [675d382]: Enhance exception handling and expose stream response (Zhichun Wu) #747
  • [c4b411b]: Drop for no usage and security reason (Zhichun Wu)
  • [7f09be8]: Validate stale connection in HTTPClient pool. (Ryan Tu) #760
  • [9afa1c4]: Add test cases for ValidateAfterInactivityMillis settings (Ryan Tu) #760
  • [afbb426]: New JDBC driver along with improved Java client (Zhichun Wu) #747
  • [8bd979b]: Fix build break (Zhichun Wu) #747
  • [369ce06]: Fix test failure when using test container (Zhichun Wu) #747
  • [331fffb]: Correct class file name (Zhichun Wu) #747
  • [81cf79c]: Remove obsolete file (Zhichun Wu) #747
  • [1b4b1d3]: Move parser to new package (Zhichun Wu) #747
  • [32ba411]: Enable toolchain with multiple JDKs (Zhichun Wu) [#762](#7...
Read more

Release v0.3.2-test3

21 Dec 15:24
48a6281

Choose a tag to compare

Release v0.3.2-test3 Pre-release
Pre-release

Commits

  • [e6205b4]: Use jdk 11 to build (Zhichun Wu) #735
  • [007d167]: Initial import of the new client (Zhichun Wu) #736
  • [43dff6d]: Fix build break (Zhichun Wu) #736
  • [9686cd4]: Discard known issues when testing against CH older than 21.9 (Zhichun Wu) #736
  • [aea7d4b]: Fix maven build warnings (Zhichun Wu) #737
  • [f66139a]: Remove groupId declaration for consistency (Zhichun Wu) #737
  • [77e67bc]: Skip negative test of DateTime/DateTime32 on 21.3 (Zhichun Wu) #737
  • [85c3bcf]: Only compares year and major version (Zhichun Wu) #737
  • [7f505be]: Skip failed cases in certain releases (Zhichun Wu) #737
  • [d5c72b0]: Limit timezone testing to JDBC driver (Zhichun Wu) #738
  • [32ca307]: Add simple cache mechanism based on Caffeine and LinkedHashMap (Zhichun Wu) #739
  • [19f0c9d]: Support maven-like version range (Zhichun Wu) #739
  • [1eb0753]: Apply version range change and enhance DNS resolver (Zhichun Wu) #739
  • [6015f67]: replace Jackson to Gson (Zhichun Wu) #740
  • [7e3fc8f]: Remove slf4j dependency from JDBC driver (Zhichun Wu) #741
  • [a8ac5b2]: Restore readUnsignedLeb128 method as requested in #710 (Zhichun Wu) #742
  • [4f93201]: support credentials and protocol (Zhichun Wu) #742
  • [cd32678]: Downgrade to JDK8 API (Zhichun Wu) #742
  • [9b23915]: prepare jdbc refactoring (Zhichun Wu) #746
  • [2bf54d8]: Bump 3rd party libs (Zhichun Wu) #746
  • [d09d385]: Primitive array, serializable option, and shaded jars (Zhichun Wu) #747
  • [dae6fdd]: ClickHouseRecord no long throws IOException and add its default implementation (Zhichun Wu) #747
  • [6d18204]: Simplify response and error handling (Zhichun Wu) #747
  • [675d382]: Enhance exception handling and expose stream response (Zhichun Wu) #747
  • [c4b411b]: Drop for no usage and security reason (Zhichun Wu)
  • [7f09be8]: Validate stale connection in HTTPClient pool. (Ryan Tu) #760
  • [9afa1c4]: Add test cases for ValidateAfterInactivityMillis settings (Ryan Tu) #760
  • [afbb426]: New JDBC driver along with improved Java client (Zhichun Wu) #747
  • [8bd979b]: Fix build break (Zhichun Wu) #747
  • [369ce06]: Fix test failure when using test container (Zhichun Wu) #747
  • [331fffb]: Correct class file name (Zhichun Wu) #747
  • [81cf79c]: Remove obsolete file (Zhichun Wu) #747
  • [1b4b1d3]: Move parser to new package (Zhichun Wu) #747
  • [32ba411]: Enable toolchain with multiple JDKs (Zhichun Wu) #762
  • [b731608]: Fix substitution issue (Zhichun Wu) #762
  • [d83f10b]: Add JDK distribution (Zhichun Wu) #762
  • [659728e]: Remove checkstyle step (Zhichun Wu) #763
  • [cdbab02]: Basic benchmark against new JDBC driver (Zhichun Wu) #763
  • [1ee8668]: Introduce ClickHouseInputStream for tiny reads (Zhichun Wu) #763
  • [395bc03]: Update benchmarks to cover more data types (Zhichun Wu) #763
  • [d11fac0]: Fix JDK 8 build failure (Zhichun Wu) #764
  • [66ba8d0]: Simplify build script (Zhichun Wu) #764
  • [ce528f1]: Remove JAXB dependency (Zhichun Wu) #764
  • [433afda]: Close initial connection when needed (Zhichun Wu) #764
  • [05e89d8]: Benchmark both http and grpc implementations (Zhichun Wu) #764
  • [[1b0714a](https://github...
Read more

Release v0.3.2-test2

09 Dec 01:32
4acc1b3

Choose a tag to compare

Release v0.3.2-test2 Pre-release
Pre-release

Commits

  • [54cd54c]: Treat Nothing as NULL and add more tests (Zhichun Wu) #774

Release v0.3.2-test1

30 Nov 11:52
8a4aee2

Choose a tag to compare

Release v0.3.2-test1 Pre-release
Pre-release

Commits

  • [e6205b4]: Use jdk 11 to build (Zhichun Wu) #735
  • [007d167]: Initial import of the new client (Zhichun Wu) #736
  • [43dff6d]: Fix build break (Zhichun Wu) #736
  • [9686cd4]: Discard known issues when testing against CH older than 21.9 (Zhichun Wu) #736
  • [aea7d4b]: Fix maven build warnings (Zhichun Wu) #737
  • [f66139a]: Remove groupId declaration for consistency (Zhichun Wu) #737
  • [77e67bc]: Skip negative test of DateTime/DateTime32 on 21.3 (Zhichun Wu) #737
  • [85c3bcf]: Only compares year and major version (Zhichun Wu) #737
  • [7f505be]: Skip failed cases in certain releases (Zhichun Wu) #737
  • [d5c72b0]: Limit timezone testing to JDBC driver (Zhichun Wu) #738
  • [32ca307]: Add simple cache mechanism based on Caffeine and LinkedHashMap (Zhichun Wu) #739
  • [19f0c9d]: Support maven-like version range (Zhichun Wu) #739
  • [1eb0753]: Apply version range change and enhance DNS resolver (Zhichun Wu) #739
  • [6015f67]: replace Jackson to Gson (Zhichun Wu) #740
  • [7e3fc8f]: Remove slf4j dependency from JDBC driver (Zhichun Wu) #741
  • [a8ac5b2]: Restore readUnsignedLeb128 method as requested in #710 (Zhichun Wu) #742
  • [4f93201]: support credentials and protocol (Zhichun Wu) #742
  • [cd32678]: Downgrade to JDK8 API (Zhichun Wu) #742
  • [9b23915]: prepare jdbc refactoring (Zhichun Wu) #746
  • [2bf54d8]: Bump 3rd party libs (Zhichun Wu) #746
  • [d09d385]: Primitive array, serializable option, and shaded jars (Zhichun Wu) #747
  • [dae6fdd]: ClickHouseRecord no long throws IOException and add its default implementation (Zhichun Wu) #747
  • [6d18204]: Simplify response and error handling (Zhichun Wu) #747
  • [675d382]: Enhance exception handling and expose stream response (Zhichun Wu) #747
  • [c4b411b]: Drop for no usage and security reason (Zhichun Wu)
  • [afbb426]: New JDBC driver along with improved Java client (Zhichun Wu) #747
  • [8bd979b]: Fix build break (Zhichun Wu) #747
  • [369ce06]: Fix test failure when using test container (Zhichun Wu) #747
  • [331fffb]: Correct class file name (Zhichun Wu) #747
  • [81cf79c]: Remove obsolete file (Zhichun Wu) #747
  • [1b4b1d3]: Move parser to new package (Zhichun Wu) #747
  • [32ba411]: Enable toolchain with multiple JDKs (Zhichun Wu) #762
  • [b731608]: Fix substitution issue (Zhichun Wu) #762
  • [d83f10b]: Add JDK distribution (Zhichun Wu) #762
  • [659728e]: Remove checkstyle step (Zhichun Wu) #763
  • [cdbab02]: Basic benchmark against new JDBC driver (Zhichun Wu) #763
  • [1ee8668]: Introduce ClickHouseInputStream for tiny reads (Zhichun Wu) #763
  • [395bc03]: Update benchmarks to cover more data types (Zhichun Wu) #763
  • [d11fac0]: Fix JDK 8 build failure (Zhichun Wu) #764
  • [66ba8d0]: Simplify build script (Zhichun Wu) #764
  • [ce528f1]: Remove JAXB dependency (Zhichun Wu) #764
  • [433afda]: Close initial connection when needed (Zhichun Wu) #764
  • [05e89d8]: Benchmark both http and grpc implementations (Zhichun Wu) #764
  • [1b0714a]: Fix JDK8 compatibility issue (Zhichun Wu) #766
  • [e0a3a65]: Support client-specific property (Zhichun Wu) #766
  • [[ddd5a19](https://github.com/ClickHouse/clickhouse-jdbc/comm...
Read more

Release v0.3.1-patch

07 Jun 03:38
537d7ec

Choose a tag to compare

This is a patch release for fixing below critical issues introduced in previous release.

  • incorrect database was used in DDL - see issue #648
  • batch insert without any parameter didn't work - see PR #655
  • negative decimal128/256 was not handled correctly - see issue #665

Release v0.3.1

27 Apr 15:06
9b72c8a

Choose a tag to compare

This is a feature release with breaking changes and known issues(expected to be fixed in 0.3.2). It's NOT recommended to upgrade if you feel comfortable with 0.2.x. If your work relies on non-JDBC APIs, you may want to wait until we're done with the refactoring in 0.4.0.

  • KNOWN ISSUES
    • Incorrect DateTime is sent to ClickHouse when server/column timezone is not UTC - #623
      Note: a workaround is to use unix timestamp for mutation.
    • Lost millisecond precision when inserting DateTime64 - #608
  • BREAKING CHANGES
    • move query from url to request body
    • always parse SQL(use extended API to skip that)
    • remove keepAliveTimeout and useNewParser from ClickHouseProperties
    • exclude RoaringBitmap from shaded jar
  • NEW FEATURES
    • add new connection setting useSharedCookieStore to achieve "read your writes" consistency
    • add new query parameters: allow_experimental_bigint_types, allow_experimental_map_type, and join_algorithm
    • add new format: CustomSeparated and RowBinaryWithNamesAndTypes
    • support batch processing with arbitrary query - update and delete are not recommended so there are warnings
    • support multi-statement sql - session will be used automatically and only the last result will be returned
  • BUG FIXES
    • fix 400 bad request error when dealing with large query
    • fix parser issue when DESC statement contains alias

Release v0.3.0

24 Mar 01:48
549a62f

Choose a tag to compare

This is a feature release with enhancements and breaking changes. It's NOT recommended to upgrade if you feel comfortable with 0.2.x. If your work relies on non-JDBC APIs, you may want to wait until we're done with the refactoring in 0.4.0.

  • BREAKING CHANGES

    • dropped JDK 7 support
    • removed Guava dependency - please use long/BigInteger to deal with UInt64 instead of UnsignedLong
  • NEW FEATURES

    • JDBC 4.2 support

    • add connection setting client_name for load-balancing and troubleshooting

    • add writeBytes & writeUUIDArray and remove UnsignedLong related methods in ClickHouseRowBinaryStream

    • support more data types: IPv4, IPv6, Int128, UInt128, Int256, UInt256, Decimal256, DateTime*, and Map

    • support ORC/Parquet streaming

    • support read/write Bitmap from/into AggregateFunction(groupBitmap, UInt[8-64]) column

      Examples...
      // use JDBC interface - NOT recommended before 0.3.1
      try (PreparedStatement statement = connection.prepareStatement("insert into my_bitmap_table values(..., ?, ...)")) {
          ...
          // RoaringBitmap bitmap = RoaringBitmap.bitmapOf(1,2,3,...);
          s.setObject(index++, ClickHouseBitmap.wrap(bitmap, ClickHouseDataType.UInt32));
          ...
          // the actual SQL in 0.3.0 will be something like, which is also why batch insertion does not work...
          // insert into my_bitmap_table values(..., bitmapBuild([toUInt32(1),toUInt32(3),toUInt32(3),...]) ...)
          s.execute();
      }
      
      // use extended API - recommended in 0.3.0
      try (ClickHouseStatement statement = connection.createStatement()) {
          statement.sendRowBinaryStream("insert into my_bitmap_table", new ClickHouseStreamCallback() {
              public void writeTo(ClickHouseRowBinaryStream stream) throws IOException {
                  ...
                  // RoaringBitmap bitmap = RoaringBitmap.bitmapOf(1,2,3,...);
                  // In addition to RoaringBitmap, you can pass:
                  // ImmutableRoaringBitmap, MutableRoaringBitmap and even Roaring64NavigableMap
                  stream.writeBitmap(ClickHouseBitmap.wrap(bitmap, ClickHouseDataType.UInt32));
                  ...
              }
          });
      }
  • BUG FIXES

    • fix error when using ClickHouseCompression.none against 19.16
    • fix NegativeArraySizeException when dealing with large array
    • fix datetime/date display issue caused by timezone differences(between client and column/server)
    • throw SQLException instead of RuntimeException when instantiating ClickHouseConnectionImpl
  • MISC

    • 19.14-lts and 20.3-lts are no longer supported so they're removed from regression list

Release v0.2.6

13 Feb 15:29
d6acab2

Choose a tag to compare

This is again a patch release with below changes:

  • Add new feature for sending compressed files/streams
  • Introduce an experimental SQL parser to fix parsing related issues - set connection setting use_new_parser to false to disable
  • Restore String[] getColumnNames() method for backward compatibility
  • Retry idempotent operation up to 3 times when server closed connection - set connection setting maxRetries to zero to disable
  • Return inserted rows(not accurate) when query parameter send_progress_in_http_headers is set to true
  • Set socket timeout in ClickHouseConnectionImpl.isValid()
  • Upgrade to lz4-java and improve performance of LZ4 stream
  • Use HTTP Basic Auth for credentials instead of query parameters
  • Use static version instead of property-based revision in pom.xml

Release v0.2.5

31 Jan 01:51
66ccd8c

Choose a tag to compare

This is a patch release with the following changes:

  • bump dependencies and include lz4 in shaded jar
  • new API: ClickHouseRowBinaryStream.writeUInt64Array(UnsignedLong[])
  • support column comments
  • support explain queries
  • fix keep-alive timeout issue by reusing validated connection
  • fix ResultSet.findColumn(String) issue
  • fix the issue of not being able to use NULL constant in PreparedStatement
  • fix toLowerCase issue for Turkish