Open
Conversation
536a00a to
e07c648
Compare
e07c648 to
1cc6b3d
Compare
1cc6b3d to
5916843
Compare
5916843 to
1d5b096
Compare
e208b55 to
ac776de
Compare
ac776de to
38d4e44
Compare
38d4e44 to
fea2489
Compare
fea2489 to
b596075
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #30 +/- ##
============================================
- Coverage 77.64% 1.38% -76.27%
+ Complexity 694 14 -680
============================================
Files 142 131 -11
Lines 2948 2746 -202
Branches 307 291 -16
============================================
- Hits 2289 38 -2251
- Misses 444 2704 +2260
+ Partials 215 4 -211 ☔ View full report in Codecov by Sentry. |
bbb6ab1 to
3992bec
Compare
e140c48 to
f6d92b7
Compare
d85fc64 to
6d9fe73
Compare
6d9fe73 to
b9175b0
Compare
b9175b0 to
3883337
Compare
3883337 to
d111108
Compare
3fd22ae to
4d56430
Compare
e3aa006 to
196e2ce
Compare
196e2ce to
7a5c551
Compare
b35dc05 to
c3d87f5
Compare
c3d87f5 to
45738f5
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR contains the following updates:
3.3.2→3.5.03.2.0→3.3.00.8.5→0.9.7Release Notes
ClickHouse/clickhouse-java (com.clickhouse:clickhouse-jdbc)
v0.9.7Compare Source
Breaking Changes
[client-v2]
Client.Builder#build()now throwsClientMisconfigurationExceptionwhen an unknown configuration property is passed. Previously, unknown properties were silently ignored what caused unexpected behaviour and problems. To restore the old behavior, addignore_unknown_config_key=trueto the client properties. JDBC driver-only properties (e.g.ssl) are no longer forwarded to the underlying client. (#2658)[client-v2]
Date/Date32columns are now decoded asLocalDatewithout any timezone adjustment. Previously,Datevalues could be returned asZonedDateTime. Applications that need aZonedDateTimemust construct it from the returnedLocalDateusing their own timezone context. More read about it - https://clickhouse.com/docs/integrations/language-clients/java/jdbc_date_time_guide (#2727)Improvements
[client-v2] Added option to send query parameters in the HTTP request body using multipart form encoding. Enabled via the new
client.http.use_form_request_for_queryconfiguration property (orClient.Builder#useHttpFormDataForQuery()). Useful when query parameters would exceed URL length limits. (#2324)[client-v2]
QueryResponse,InsertResponse, andCommandResponsenow exposegetServerDisplayName()to retrieve the value of theX-ClickHouse-Server-Display-NameHTTP response header. A full map of whitelisted response headers is accessible viagetResponseHeaders(). (#2347)[client-v2] Added
getObjectArray()toClickHouseBinaryFormatReaderandGenericRecordto readArray(...)columns asObject[], including recursive support for nested arrays.getStringArray()now also handlesArray(Enum*)by returning enum names. (#2738)[jdbc-v2] Added support for reading and writing
byte[]forString/FixedStringcolumns.PreparedStatement#setBytes()encodes the value as a ClickHouseunhex()expression to preserve raw bytes;ResultSet#getBytes()returns the UTF-8 bytes of the string value. (#2734)Date and Time Handling
[docs] Added a document that explains how driver handles different date/time values.
[client-v2, jdbc-v2] Fixed writing
Date/Time/Timestampvalues so that timezone conversions are performed explicitly. Previously, timezone-naïve encoding caused day-shift and precision bugs, especially when aCalendaror non-default JVM timezone was in use. (#2701, #2065, #2496, #1220, #1117, #1048, #2381, #1735, #2542, #2557)[client-v2, jdbc-v2] Fixed reading
Date/Time/DateTimevalues to be consistent and correct.Date/Date32are now decoded asLocalDate(no timezone), whileTime/Time64are decoded as UTC-basedLocalDateTime. NewgetLocalTime()API added to readers forLocalTimeaccess. Reading date/time fromDynamicandVariantcolumns is also fixed. (#2727)[jdbc-v2]
DatabaseMetaDataImpl#getTypeInfo()now returns type information in deterministic alphabetical order, matching v1 driver behavior. (#2733)SQL Parser (jdbc-v2)
[jdbc-v2] Fixed SQL parser failing to handle ClickHouse keywords used as table names or column aliases (e.g.
AS value,FROM date). Both the ANTLR4 and JavaCC parsers now maintain a list of non-reserved keywords allowed in identifier positions. Also fixed parsing ofDESCRIBE (SELECT ...),INoperator inSELECT, and bracketed array access in expressions. (#2718)[jdbc-v2] Updated SQL parsers to recognise new ClickHouse keywords (
ABI,ARGUMENTS,DRY,LANGUAGE,RETURNS,RUN) introduced in recent ClickHouse HEAD builds. Previously, queries using these keywords as identifiers would fail to parse. (#2761)[jdbc-v2] Fixed SQL parser failing on statements containing the
^(caret) operator, such astoJSONString(data.^header_index). A newCARETtoken is now recognised and allowed in dotted identifier chains. (#2768)Array and Collection Handling
[jdbc-v2] Fixed
DataTypeConvertercausing NPE when converting nested arrays to strings (e.g.ResultSet#getString()on anArray(Array(...))column). The converter is now re-entrancy-safe. Previously was throwingNullPointerException. (#2723)[client-v2, jdbc-v2] Fixed conversion of multi-dimensional
List/array values into Java arrays. Child array dimensions are now calculated correctly from the parent depth level. Previously, convertingList<List<T>>or similar structures produced incorrect results. (#2741)[client-v2] Fixed binary array decoding when the first element of an array is an empty
MaporList. Previously, this caused a type mismatch error during array population. (#2499, #2657, #2703)Bug Fixes
[jdbc-v2] Fixed
DatabaseMetaDataImpl#getJDBCMajorVersion()andgetJDBCMinorVersion()returning the ClickHouse driver version instead of the supported JDBC specification version. Now correctly returns4and2(JDBC 4.2). (#2736)[jdbc-v2] Added mapping for all known ClickHouse table engines to JDBC table types. Added
MATERIALIZED VIEWas a new table type.getTables()now correctly reports remote/external engine tables that were previously invisible. (#2664)[jdbc-v2] Fixed
NullPointerExceptionin JDBC type metadata for columns of typeMap,IPv4,IPv6,UUID,BFloat16,Decimal256,Geometry, allInterval*types,JSON,LowCardinality,Nullable,Variant,Dynamic, and others. Previously these types had no Java class mapping. (#2711)[jdbc-v2] ClickHouse server error codes are now propagated to
SQLException#getErrorCode(). Previously,SQLExceptionwas created without the vendor error code, making it impossible to distinguish error types programmatically. (#2717)[client-v2] Fixed
max_execution_timenot being sent correctly to the server. Previously, it was treated as a client option and ignored by ClickHouse; it is now transmitted as a server setting. (#2750)[client-v2] Fixed
hasValue(columnName)throwing an exception when the column name does not exist. Previously, referencing an unknown column or an out-of-range index viahasValue()would throw; it now returnsfalse. (#2755)[jdbc-v2] Fixed
PreparedStatementreporting missing parameters using 0-based indices in the error message. JDBC parameter positions are 1-based; the error message now reflects this correctly. (#2749)[jdbc-v2] Ported legacy JDBC v1 connection properties (
CUSTOM_HTTP_PARAMS,CUSTOM_SETTINGS,HTTP_CONNECTION_PROVIDER,REMEMBER_LAST_SET_ROLES,USE_SERVER_TIME_ZONE_FOR_DATES) to JDBC v2. Required for integrations that share JDBC v1/v2 configuration code.custom_http_paramsandcustom_settingsvalues are converted to server settings automatically. (#2757)[client-v2, jdbc-v2] Fixed
custom_-prefixed configuration properties not being forwarded to the server as custom settings when using thecustom_prefix. Also fixed driver-only properties (e.g.ssl) being incorrectly forwarded to the HTTP client. (#2658)v0.9.6Compare Source
Release is aimed to address potential security risk in one of the dependencies (see below). We strongly recommend to upgrade.
Dependencies
lz4-javato1.10.2. Previously used version had a vulnerability https://www.cve.org/CVERecord?id=CVE-2025-66566. (#2706)commons-lang3to3.20.0. Previously used version had a vulnerability https://www.cve.org/CVERecord?id=CVE-2025-48924. (#2696)New Features
v0.9.5Compare Source
New Features
getResultSet()method in Array data types. (#1545, #2683)TimeandTime64data types in JDBC. (#2682)Bug Fixes
Arraywith component typeVariant. For example,Array(Variant(String, Int32)). (#2602)getPrimaryKeys()method. (#2654)::cast operator withCASTfunction in prepared statements. Fixed issue with reading database version on older versions. (#2654, #2227)v0.9.4Compare Source
New Features
Bug Fixes
v0.9.3Compare Source
Important Changes
[jdbc-v2] SQL parser from v1 is ported to v2 to address multiple issues with SQL parsing. The ANTLR4-based parser is
still an option and will be developed further. The main difference between parses is completeness of their grammar:
JavaCC grabs only needed information and skips parsing of the rest (what makes it work for most cases) while ANTLR4
has more complete grammar and can detect type of some complex statements more accurate than JavaCC.
To use it set
com.clickhouse.jdbc.DriverProperties#SQL_PARSERtoANTLR4.(#2579). This fixes issue:
[repo] New artifact
clickhouse-jdbc-alladded to address issue when maven package qualifiers may not be used.This artifact should is a copy of
clickhouse-jdbc:allbut should be used only when required. (#2625)Improvements
getShortArray()andgetStringArray()toClickHouseBinaryFormatReader. (#2604)result_rowsandelapsed_timeto summary object. (https://redirect.github.com/ClickHouse/clickhouse-java/pull/1633/files)Bug Fixes
maxRowsinStatementwhen additional settings were used to limit result set size.It caused problems with read-only users because such users may not change settings in most cases. Now when
maxRowsisset then
ResultSetwill skip extra rows. (#2582)But this approach doesn't work well with
0.9.xversions. Now major and minor versions are combined by shifting major.Patch version becomes a minor version. (#2410)
address when
toString()was used and returned\0.0.0.0instead of0.0.0.0. (#2575)server context. (#2247)
com.clickhouse.client.api.ClientException: Unsupported data type with tag 101 at ...(#2598, #2593,
#2613, #2102)
socket_lingerto match documentation. (#2524)filterclause along with aggregate function. (#2631)v0.9.2Compare Source
Improvements
ResultSetImpl.getObject()handlesjava.time.InstantImprovements
com.clickhouse.jdbc.ClientInfoPropertiesandcom.clickhouse.jdbc.DriverPropertiesmoved to publicAPI. (#2521)
isBeforeFirst,isAfterLast,isFirst,isLastmethods forResultSetandResultSetMetaData.Improved test coverage for
ResultSetImpl. (#2530)createArrayandcreateStructmethods forConnectioninterface. MethodcreateStructshould be used to create
Tuplevalues andcreateArrayto create various arrays. (#2523)setNetworkTimeoutofConnectioninterface. Used to fail fast when network operation fails. Related tostale connection problem. (#2522)
JSON(a string, b.c Int32)were not supported. (#2531)
Bug Fixes
createArraymethod ofConnectioninterface.(#2360)
InsertSettingswhen two concurrent insert operations sharing same settings object may be insertwrong columns or to a wrong table. (#2550)
DatabaseMetadataImplto return result set with defined by spec structure. Resolves issue for many database toolsrelying on metadata. (#2396)
DatabaseMetadataImplto return empty result set where appropriate. (#2517)v0.9.1Compare Source
New Features
com.clickhouse.client.api.Client.Builder.sslSocketSNI(#2467)TimeandTime64data types. (#2487)Instantto a DB DateTime format. Seecom.clickhouse.client.api.DataTypeUtils.formatInstant(java.time.Instant, com.clickhouse.data.ClickHouseDataType)(#2501, #2456)Improvements
com.clickhouse.client.api.ClickHouseExceptionbecame a root forServerExceptionandClientException.com.clickhouse.client.api.ClickHouseException.isRetryableis added to determine ifexception caused in a retriable state. It means that catching such exception application may repeat operation to fix a
problem. (#2453)
ReaderandGenericRecordreturn specific types. For example,collection instead of
Array. (#2476)Bug Fixes
DatabaseMetadatato return correct column type. (#2475)-were parsed wrong. (#2463)ArrayValueobject was returned as element of a nested array.After the fix array values contain primitive types. (#2464, #2340)
isValidmethod returningtrueall the time. (#2472)StatementImpl. (#2414)PreparedStatementImpl. (#2418)v0.9.0Compare Source
Important Changes
clickhouse-jdbc:http,clickhouse-jdbc:shaded-all,clickhouse-jdbc:shadedare not published anymore. Useclickhouse-jdbc:allinstead. It contains all required shaded libraries exceptorg.slf4j:slf4j-apibecause it may not be shaded.jdbc-v2:all,jdbc-v2:http,jdbc-v2:shadedare not published anymore becausejdbc-v2is part ofclickhouse-jdbc:all.Bug Fixes
FROMclause when alias name is a keyword (#2427)CREATE USERstatements. Now parser recognises it correctly. (#2398)ResultSet#findColumnalways returning0. (#2375)Misc
ClientConfigurationPropertiesenum. (#2269)Docs
v0.8.6Compare Source
Improvements
Invalid SQL still possible to execute if logic able to get all required information. (#2351)
RowBinaryWriterif enabled by propertycom.clickhouse.jdbc.internal.DriverProperties.BETA_ROW_BINARY_WRITER.This works well for batches. Single statements may get no benefits. (#2316)
Bug Fixes
-. (#2325)INSERTdoesn't containVALUES. (#2283)INSERTstatement whenVALUESis in lower case. (#2354)In this case default JVM executor will be used. (#2355)
to
Inet6Address. Similar problem fixed for JDBC. (#2342)USEstatement executed. (#2137)booleanfields. (#2248)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.