Releases: ClickHouse/clickhouse-java
Release v0.4.2
This is a minor release with bug fixes and some new features.
-
💥 BREAKING CHANGES
- Refactored SQL parser to support keywords
compression
,infile
, andoutfile
- Refactored SQL parser to support keywords
-
🐛 Bug Fix
- remove duplicated socket options - #1263 by @JackyWoo
- error while converting Nested values to Java maps
- incorrect algorithm extracted from PEM - #1274
- transaction failure introduced in 0.4.0
- respect node-specific credentials - #1114
- USE statement does nothing - #1160
- executeBatch does not support on cluster anymore - #1261
-
✨ New Feature
- Add credentials overload for Java client - #1265 by @rickysaltzer
- centralized configuration for JDBC driver using custom server setting
custom_jdbc_config
- #1290 - support
BEGIN TRANSACTION
,COMMIT
, andROLLBACK
statements in JDBC driver - new options for JDBC driver
-
🎨 Misc
- move docs to ClickHouse website as well as bug template and contribution guide - by @mshustov
- improved error messages for missing dependency
- replaced default JDBC artifact with shaded jar and more dependencies in
provided
scope
Release v0.4.1
This is a patch release mainly for bug fixing. It is highly recommended to upgrade if you're using v0.4.0.
-
💥 BREAKING CHANGES
- changed option names - #1203
compress_alogrithm
->compress_algorithm
decompress_alogrithm
->decompress_algorithm
- changed option names - #1203
-
🐛 Bug Fix
- incorrect nested array values - #1223
- broken serde for
Nested
, which also impactedJSON
- #1242 - broken serde for bitmap64 - #1248
- gRPC client may complete execution before closing response stream
- throw
StreamCorruptedException
instead of genericIOException
when deserialization failed (mostly due to server error)
-
✨ New Feature
- added source in shaded jar for IDE friendly - #1217
- iterable
ClickHouseInputStream
, which slightly improved performance of piping - #1238 ClickHouseOutputStream.transferBytes()
is deprecated and it will be removed in 0.5read()
andwrite()
methods in ClickHouseClient -connect()
is deprecated and it will be removed in 0.5- make all dependencies of JDBC driver optional, along with configuration for building native binary - #1247
-
🎨 Misc
- added PR template and changelog by @mshustov
- renamed repository from
clickhouse-jdbc
toclickhouse-java
, and branch frommaster
tomain
by @mshustov - update outdated docs by removing yandex and correcting class names by @mzitnik and @alexey-milovidov
Release v0.4.0
Happy Spring Festival everyone! Apologize for a minor release taking so long :p
This is a feature release with new features, performance improvement, bug fixes, and unfortunately breaking changes.
-
💥 BREAKING CHANGES
- refactored
JdbcTypeMapping
to make it extensible - #1075 - removed legacy driver
ru.yandex.*
- #1089 by @mzitnik - removed most deprecated methods and class members
- refactored data processor(for serialization and deserialization) and added new classes for unsigned types - #1124
- refactored ClickHouseRequest/ClickHouseInputStream/ClickHouseOutputStream to better support compression - #1174 & #1189
- extracted
clickhouse-data
fromclickhouse-client
along with new packages - #1197com.clickhouse.config // generic configuration com.clickhouse.data // data processing utilities com.clickhouse.logging // generic logging utility
- added jdk17 in pom and changed build instructions
mvn -Dj8 clean install # for jdk8, it was 'mvn clean install' mvn clean install # for jdk17, it was 'mvn -Drelease clean install'
- refactored
-
🐛 Bug Fix
- not able to cancel query when there's session_id - #1035
- overflow error when handling BigInteger and BigDecimal in ClickHouseLongValue - #1040 by @Blackmorse
- not handling SimpleAggregateFunction properly - #1054
- DELETE FROM was rewritten to ALTER TABLE DELETE even when lightweight deletion was enabled - #1063
- forced headless format for inserting - #1073
- missing the verb "be" in error messages - #1137 by @fabiencelier
- write time field data loss precision - #1127 by @gaaraG
- fixed a few copy-paste error causing problem handling Geo types
-
✨ New Feature
- added R2DBC driver - #914 by @rernas35
- enhanced ClickHouseClient for importing and exporting compressed file - #1004
- added new option
custom_settings
- #1059 - enhanced
ClickHouseRequestManager
to support query/session ID customization - #1074 - added Apache HTTP Client 5 to support socket options - #1146 by @JackyWoo
- enhanced
clickhouse-grpc-client
to support request chunking and compressiondecompress_alogrithm
(request compression):BROTLI
[-1,11],BZ2
,DEFLATE
[0,9],GZIP
[-1,9],LZ4
[0,18],XZ
[0,9],ZSTD
[0,22]compress_alogrithm
(response decompression):DEFLATE
,LZ4
,ZSTD
Note: typo will be fixed in v0.4.1.
- enhanced
clickhouse-http-client
to support zstd compression for both request and responsedecompress_alogrithm
(request compression):LZ4
[0,18],ZSTD
[0,22]compress_alogrithm
(response decompression):BROTLI
,BZ2
,DEFLATE
,GZIP
,LZ4
,XZ
,ZSTD
Note: typo will be fixed in v0.4.1.
- added stream-based prepared statement - #1163
- browser-like client name (
select distinct http_user_agent from system.query_log
) - #1182 - enhanced
ClickHouseRequest
by treating input stream andClickHouseWriter
equally - #1200
-
🎨 Misc
- dropped
develop
branch, which accidentally removed all open pull requests 😭 - fixed some issues captured by SonarCloud and LGTM
- added more tests but the coverage is still very low 🤣
- enabled nightly build in CI - check out Sonatype OSSRH
<repositories> <repository> <id>ossrh</id> <name>Sonatype OSSRH</name> <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url> </repository> </repositories>
- dropped
Release v0.3.2-patch11
This is a patch release for bug fixes and experimental features.
-
Bug Fix
- Bitmap64 deserilization error - #918
- Incorrect update count - #947
- Dependencies lost in pom.xml - #973
- Error when executing empty batch using
PreparedStatement
- #977 - Connection properties may lost - #978
ResultSet.getObject(int, Class)
may return default value instead of null - #979- Redundant classes in shaded jar - #989
PreparedStatement.addBatch()
timed out - #991- Set
nullAsDefault
to2
may triggerIllegalArgumentException
when handling timestamp with timezone - #999
-
New Feature
ClickHouseRequestManager
is added for customizing query ID and session ID - #870PreparedStatement.getParameterMetaData()
is implemented - #972- Experimental transaction support - #975
- Direct file upload and download - #1001
- Failover across protocols
- Repeat the same query until timed out, only when session is locked on server - set
repeat_on_session_lock
tofalse
to turn it off
commits...
- [3535d11]: Fix custom properties lost issue and add more tests (Zhichun Wu) #980
- [142944b]: Remove hard-coded protocol (Zhichun Wu) #980
- [844b2b8]: Stop throwing exception when executing empty batch (Zhichun Wu) #981
- [70612d8]: Return null instead of default value for nullable types (Zhichun Wu) #982
- [9f9ef67]: More tests to cover socket timeout and error during query/insert (Zhichun Wu) #983
- [57d8d76]: Fixes number cast exception when Boolean[] is used in ClickHouseArrayValue (Kanthi Subramanian) #985
- [82eb49a]: Skip failed test case (Zhichun Wu) #983
- [890f602]: convert long[] to BigInteger[] - #984 (Zhichun Wu) #983
- [24035e6]: Only run the test for http implementation (Zhichun Wu) #983
- [702a638]: add test to ensure BigInteger[] can be converted back to long[] as well (Zhichun Wu) #983
- [b468f1d]: Skip the tests for non-http implementation (Zhichun Wu) #983
- [8cc6033]: Convert byte[] to Boolean[] and more tests (Zhichun Wu) #985
- [1f633d6]: implement getParameterMetadata method in PreparedStatement (Zhichun Wu) #988
- [8d6ce58]: Clean up pom files (Zhichun Wu) #992
- [8b8415f]: Fix build failure (Zhichun Wu) #992
- [52de029]: Fix incorrect error code when using HttpClient on 21.3 (Zhichun Wu) #992
- [04b9c4b]: Fix slowness in performance mode and failover not working when protocol is unsupported (Zhichun Wu) #995
- [9326785]: Fix format error when last argument is Throwable (Zhichun Wu) #995
- [0780c7c]: Correct node config overloading and failover from one protocol to another (Zhichun Wu) #995
- [6a56549]: Use named container in CI when using CLI client (Zhichun Wu) #995
- [c010b4d]: Skip the failed case for now (Zhichun Wu) #995
- [81168a2]: max_result_rows should never be applied to metadata queries (Zhichun Wu) #997
- [9be9db2]: Add use_no_proxy option to avoid using proxy (Zhichun Wu) #998
- [823b32a]: Merge branch 'develop' of github.com:zhicwu/clickhouse-jdbc into develop (Zhichun Wu) #998
- [a95ea43]: Add missing config (Zhichun Wu) #998
- [aeb5878]: Use unbounded queue for batch insert (Zhichun Wu) #1000
- [6a11320]: Rename test and consider clearBatch (Zhichun Wu) #1000
- [d1a97b1]: support direct upload/download in http client (Zhichun Wu) #1004
- [4baa9c9]: Experimental transaction support (Zhichun Wu) #1008
- [3c4b863]: Fix compile error on JDK 8 (Zhichun Wu) #1008
- [de97ada]: Fix test failures on 22.7 (Zhichun Wu) #1008
- [77f949e]: Fix Roaring64NavigableMap reading mismatches (wuzq) #1011
- [86fe010]: improve implicit transaction support and error handling (Zhichun Wu) #1008
- [9633bf8]: Improve error message as suggested in #1010 (Zhichun Wu) #1008
- [d7a6f77]: Roll back unnecessary changes (Zhichun Wu) #1008
- [33cf266]: Enable repeat_on_session_lock to test CI (Zhichun Wu) #1008
- [1d68dcd]: Bump ClickHouse version and test again (Zhichun Wu) #1008
- [439d345]: Update doc for build and testing (Zhichun Wu) #1018
- [[537663b](https://github.com/ClickHouse/click...
Release v0.3.2-patch10
This is a patch release for bug fixes and experimental features.
-
Bug Fix
- bump gRPC to 1.45.1 - #936
- fix insert timeout error as mentioned in #943
- fix issue of parsing slash in connection string - now you don't have to encode slash in query parameters
- fix JDBC multi-value insert error - #920
- fix JDBC metadata error on 21.6 and
rename_response_column
option no longer impact metadata queries - #938
-
New Feature
commits...
- [da685b4]: update grpc to 1.45.1 (Nathan J Mehl) #936
- [02938f6]: update third-party libraries (Nathan J Mehl) #936
- [dd6c285]: Update test report when build failed (Zhichun Wu) #937
- [0d872b3]: Bump version (Zhichun Wu) #937
- [0e9b519]: Fix typo (Zhichun Wu) #939
- [c22cdc1]: file-based data loading and dumping (Zhichun Wu) #939
- [45c95d3]: Add CLI client (Zhichun Wu) #939
- [92e075d]: Fix compile errors and test failures (Zhichun Wu) #939
- [7db110f]: Fix #920 (Zhichun Wu) #940
- [ba83399]: Support --secure and --query_id two options (Zhichun Wu) #941
- [298a67d]: Add more formats (Zhichun Wu) #941
- [5fc2c54]: Update request format according to parsed query (Zhichun Wu) #941
- [5420317]: Skip one more test case for cli client (Zhichun Wu) #941
- [afc63d9]: Update build script (Zhichun Wu) #941
- [e495b45]: Enhance query to avoid 'Block structure mismatch' error on 21.6 (Zhichun Wu) #942
- [0a171ad]: Never rename column when retrieving JDBC metadata (Zhichun Wu) #942
- [ad5187b]: Bump jmh to latest (Zhichun Wu) #942
- [e61607f]: Add workaround for maven timeout error (Zhichun Wu) #942
- [fb126fc]: Fix timeout issues (Zhichun Wu) #943
- [802ccf6]: Remove --update-snapshots option from build stage (Zhichun Wu) #943
- [75ddd37]: Multi-endpoint support (#956) (Zhichun Wu) #956
- [a1a617c]: Change default sslmode to strict for security reason (Zhichun Wu) #963
- [3b48e07]: support custom writer for streaming (Zhichun Wu) #963
- [5a1c464]: Bump version and update docs (Zhichun Wu) #963
- [de865c3]: Fix deserialization issue in performance mode (Zhichun Wu) #968
- [cfbfe13]: slightly improved lz4 performance (Zhichun Wu) #969
- [e86d45e]: Use /tmp directory to transfer data from host to container (Zhichun Wu) #969
- [b904a6b]: Disable testCustomLoad for cli-client (Zhichun Wu) #969
- [6f82de2]: Fix table not found error (Zhichun Wu) #969
- [aebad16]: Correct readme (Zhichun Wu)
Release v0.3.2-patch9
This is a patch release mainly for fixing below issues:
- fix issue parsing Tuple with names - #889 (which was not fully fixed in previous release)
- fix
unsupported format
error when loading data in custom format - #909 - fix precision issue when converting Float and Double to BigDecimal - #921
- fix type conversion issue when dealing with nullable array elements - #924
- fix OOM issue when loading lots of data through http interface - as mentioned in #861
- fix broken query for retrieving client info properties
In addition, a few more changes(mainly for streaming) were merged from 0.3.3 branch, along with some new features:
- new option
rename_response_column
for removing column prefix - new option
request_chunk_size
(defaults to 8192) for streaming - same option will be applied to gRPC client in the near future - new options
request_buffering
andresponse_buffering
for customizing buffering mode - more details will be covered in #928- Resource-Efficient the default mode which consumes less CPU and memory
- Performance uses more CPU and much more memory for better performance
- Custom allows you to customize options like
buffer_size
,max_buffer_queue
,buffer_queue_variation
,use_blocking_queue
etc. to balance performance and resource utilization
commits...
- [2c7bf77]: Fix issue when parsing multi-word data type (Zhichun Wu) #901
- [18708db]: Make ClickHouseEnum serializable (Zhichun Wu) #921
- [ea44bc5]: Add methods for creating multiple values in one go (Zhichun Wu) #921
- [192e7a7]: Fix #913 (Zhichun Wu) #921
- [b41af34]: Fix build failure on 22.4 (Zhichun Wu) #922
- [a849396]: Add new option for rename response column names (Zhichun Wu) #923
- [4748b8a]: Enhance pipeline and introduce buffering mode (Zhichun Wu) #925
- [1bf60d7]: Increase timeout and upload test reports when build failed (Zhichun Wu) #925
- [262029f]: Add fixed capacity policy for testing (Zhichun Wu) #925
- [8eb0fa7]: Fix write timeout error (Zhichun Wu) #925
- [c3dbfe3]: Remove extra flush when closing piped output stream (Zhichun Wu) #926
- [b0789f5]: Fix #909 (Zhichun Wu) #926
- [fde782b]: Bump version (Zhichun Wu) #926
- [bc7702e]: Fix JDK 8 compatibility issue (Zhichun Wu) #927
- [ca39757]: Update buffer options for consistency and new option for adaptive queue (Zhichun Wu) #930
- [eeece78]: Fix broken query for retrieving client properties (Zhichun Wu) #930
- [66cb081]: Fix the double flush issue in deprecated class as well (Zhichun Wu) #930
- [b135b29]: Add test case for #896 and 931 (Zhichun Wu) #932
Release v0.3.2-patch8
This is a patch release mainly for fixing below issues:
- fix issue with null in legacy JDBC driver json response deserializer - #879
- fix issue set String as Enum value in new JDBC driver - #883
- fix issue when deserializing array of DateTime with timezone - #886
Note: for exampleMap(String,Array(Nullable(DateTime64(3,'Asia/Shanghai'))))
- fix key type when deserializing map objects - #887
- fix issue parsing Tuple with names - #889
In addition, more changes(mostly related to streaming) were merged from 0.3.3 branch along with some new features:
- TLS authentication support - #523
- support SimpleAggregateFunction data type
- initial support of experimental data type JSON/Object('JSON')
select tuple(1,[2,3], map('4', 5))::Tuple(Int32, Array(Int32), Map(LowCardinality(String), Int32)) select tuple(1,[2,3], map('4', 5))::Tuple(i1 Int32, a1 Array(Int32), m1 Map(LowCardinality(String), Int32))
If you're using Java client, please be aware of below changes which may or may not cause compiling errors:
- many methods changed to return ClickHouseInputStream/ClickHouseOutputStream instead of plain InputStream/OutputStream
- ClickHouseLZ4InputStream and ClickHouseLZ4OutputStream are removed
commits...
- [37d261b]: Use getSetting function to retrieve setting as suggested in #866 (Zhichun Wu) #869
- [772d304]: Add default rounding mode as suggested in #864 (Zhichun Wu) #869
- [30814bf]: switch to v0.3.3 (Zhichun Wu) #869
- [de92f70]: Fix broken links (Zhichun Wu)
- [7714fa8]: fixed issue with null in legacy driver's json response + test (debychkov) #879
- [8e32c3b]: Fix key type when deserializing map objects (Jean-Noel Delavalade) #887
- [ed47720]: Support Object/JSON and Tuple with names and types (Zhichun Wu) #890
- [096fcf2]: Rename root element (Zhichun Wu) #890
- [e86bd13]: Patch container before integration test (Zhichun Wu) #890
- [35fad2d]: Fix build break caused by server compatibility issue (Zhichun Wu) #890
- [72afe97]: Enhance data type handing and conversion between IPv4 and IPv6 (Zhichun Wu) #890
- [4b651f7]: Fix test failure (Zhichun Wu) #890
- [f782b77]: return string by default for enum column (Zhichun Wu) #890
- [5cd7e0b]: Update dependency, doc and version (Zhichun Wu) #890
- [c909574]: Clean up code and enhance enum types (Zhichun Wu) #890
- [8448caa]: Update benchmarks (Zhichun Wu) #890
- [4c5a101]: Merge stream changes from v0.3.3 branch along with TLS and exception handling improvement (Zhichun Wu) #890
- [822673d]: Upgrade gRPC client (Zhichun Wu) #890
- [67ff035]: Fix javadoc error on CI (Zhichun Wu) #890
- [2d3779c]: Add workaround for 21.3 / 21.8 (Zhichun Wu) #890
- [47af1ff]: stop testing grpc on 21.8 or early version (Zhichun Wu) #890
- [2d785c0]: Stop testing TLS client authentication (Zhichun Wu) #890
- [27dfc0c]: Skip default value test for gRPC (Zhichun Wu) #890
- [b1706dc]: Fix test failures on 21.3 and 21.8 (Zhichun Wu) #890
- [ffd81d7]: Enhance error handling and reduce temporary objects (Zhichun Wu) #890
- [795dd30]: Benchmark against 22.3 (Zhichun Wu) #890
- [14f856a]: Skip gRPC tests unless ClickHouse is 22.3+ (Zhichun Wu) #890
- [0e2b532]: Skip a few more tests on 21.3 (Zhichun Wu) #890
- [97ee2d1]: Update readme (Zhichun Wu) #899
- [753e67f]: add session_id connection property and expose more change events (Zhichun Wu) #899
Release v0.3.2-patch7
This is a patch release for fixing below issues in both Java client and JDBC driver.
- fix backward compatibility issue in legacy driver - #862
- fix rounding error when converting Float/Double value to BigDecimal - #864
- enable read-only support in JDBC driver - #866
In addition, there are a few more changes were merged from 0.3.3 branch:
ResultSet.unwrap()
now supportsClickHouseRecord
(current row) in addition toClickHouseResponse
(whole results)ClickHouseColumn
now provides estimated byte length, which can be used in read/write optimization- synchronous methods
ClickHouseClient.executeAndWait()
andMutation.sendAndWait()
for ease of use
commits...
- [5143fe2]: added custom deserializer to legacy ClickHouseResponse (debychkov) #862
- [bfa5698]: Add rounding mode for irrational BigDecimal numbers (volodya-lombrozo) #864
- [2bd41ff]: remove empty spaces (volodya-lombrozo) #864
- [5e8e016]: Add test and dedup code (Zhichun Wu) #862
- [0b99f24]: Revert format changes (Zhichun Wu) #862
- [253cc7c]: Add tests and change RoundingMode to DOWN for consistency (Zhichun Wu) #864
- [48ee26e]: Enable read-only support (Zhichun Wu) #866
- [55b71cb]: Bump version (Zhichun Wu) #867
- [6977c17]: Merge a few more changes from 0.3.3 branch (Zhichun Wu) #867
Release v0.3.2-patch6
This is a patch release for fixing below issues in both Java client and JDBC driver.
- enhance Bool support - #848
- fix confusing error message metioned in #849
- fix issue of writing Date32 value in RowBinary format
- fix OffsetDateTime parsing error
- fix NumberFormatExcption when parsing primitive array with null value
- fix incorrect column type used in Connection.createArrayOf method
- enhance PreparedStatement by treating
insert into table(col1,col2,col3) values(?,?,?)
asinsert into table(col1,col2,col3)
commits...
- [5e4354e]: fix links in README.md (XenoAmess) #852
- [877e20c]: Enhance Bool support (Zhichun Wu) #853
- [6cd6821]: Fix build break on JDK 8 (Zhichun Wu) #853
- [3a28431]: Fix test failure on CH older than 22.1 (Zhichun Wu) #853
- [b90c9c5]: Bump dependencies (Zhichun Wu) #854
- [46e976e]: Bump version (Zhichun Wu) #855
- [ec91d1f]: Fix issue of writing Date32 value (Zhichun Wu) #855
- [f4a2fb3]: Fix confusing error message in #849 (Zhichun Wu) #855
- [3558498]: Fix OffsetDateTime parsing error (Zhichun Wu) #855
- [1a53839]: Fix NumberFormatExcption when parsing primitive array with null value (Zhichun Wu) #855
- [09cd66e]: Treat "insert into table values(?,?)" as "insert into table" (Zhichun Wu) #855
- [046c3f2]: Correct behavior of Connection.createArrayOf (Zhichun Wu) #856
Release v0.3.2-patch5
This is a patch release primarily for fixing below issues in JDBC driver. You don't have to upgrade if you're using Java client.
continueBatchOnError
was ignored in Statement.executeBatch()- executeQuery() may return null
- PreparedStatement.executeUpdate() did not work for insert statement using input function
- Exception was swallowed in Statement.executeUpdate() - #836
In addition, exception handling is improved along with some minor changes:
- support largeMaxRows, largeUpdateCount and executeLargeBatch
- disable
execute(*)
,executeQuery(*)
,execute*Update(*)
, andaddBatch(*)
methods in PreparedStatement to follow JDBC standard - throw BatchUpdateException instead of SQLException in execute*Batch method
- empty batch is no longer allowed - addBatch is a required before execute*Batch
- query in batch is not allowed, according to JDBC standard
- mixed use of addBatch and execute / executeQuery / execute*Update is not allowed
- ported some IO classes from 0.3.3 branch for slightly improved performance
commits...
- [7439cef]: Bump version (Zhichun Wu) #837
- [2782a3b]: Throw error in executeUpdate() and support continueBatchOnError in executeBatch() (Zhichun Wu) #837
- [ea49d7f]: Add notice for upgrading (Zhichun Wu)
- [6fdf02a]: Change max_result_rows from int to long (Zhichun Wu) #841
- [8ff5cdf]: Add reusable empty ClickHouseResponse which is stateless (Zhichun Wu) #841
- [ab09d64]: Enhance exception handling along with largeMaxRows and largeUpdateCount support (Zhichun Wu) #841
- [fd4b47f]: Port IO classes from 0.3.3 (Zhichun Wu) #841
- [105de13]: Validate JDK 11 HttpClient-based impementation as well (Zhichun Wu) #841
- [db4e219]: Call HttpURLConnection.disconnect when closing response, and avoid double buffering (Zhichun Wu) #841