Releases: ClickHouse/clickhouse-java
Release v0.9.3
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 setcom.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 ofclickhouse-jdbc:allbut should be used only when required. (#2625)
Improvements
- [client-v2] Added
getShortArray()andgetStringArray()toClickHouseBinaryFormatReader. (#2604) - [client-v2] Added
result_rowsandelapsed_timeto summary object. (https://github.com/ClickHouse/clickhouse-java/pull/1633/files)
Bug Fixes
- [jdbc-v2] Fixed issue with
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 whenmaxRowsis
set thenResultSetwill skip extra rows. (#2582) - [jdbc-v2] Fixed issue with driver version. Previously version of a library was converted to minor and major version.
But this approach doesn't work well with0.9.xversions. Now major and minor versions are combined by shifting major.
Patch version becomes a minor version. (#2410) - [jdbc-v2, client-v2] Fixed converting different data types to a string. For example, there was an issue with IP
address whentoString()was used and returned\0.0.0.0instead of0.0.0.0. (#2575) - [jdbc-v2] Fixed issues around spatial data (GEO types). (#2577)
- [client-v2] Fixed issue with current user name. If user name is set then it will be used event after reading
server context. (#2247) - [client-v2] Fixed issue with network timeout settings when default value failed to be cast to Long. (#2597)
- [jdbc-v2] Fixed getting metadata for nullable columns. (#2586)
- [jdbc-v2, client-v2] Fixed issues related to reading JSON data type. Fixed reading JSON columns with arrays. Previously was causing exceptions like
com.clickhouse.client.api.ClientException: Unsupported data type with tag 101 at ...
(#2598, #2593,
#2613, #2102) - [client-v2] Fixed configuration parameter type for
socket_lingerto match documentation. (#2524) - [client-v2] Fixed handling exceptions in http client code. Now response object is always closed to prevent connection leaking. (#2615)
- [jdbc-v2, client-v2] Fixed issue with duplicate column names in a result set. (#2459, #2336)
- [jdbc-v2] Fixed ANTLR4 parse issue with
filterclause along with aggregate function. (#2631)
Release v0.9.2
Important
There is a new artifact clickhouse-jdbc-0.9.2-all-dependencies.jar. This include all dependencies shaded even public APIs like slf4j. It may be a problem when integration with application needed thru such interfaces.
Improvements
- [jdbc-v2] Classes
com.clickhouse.jdbc.ClientInfoPropertiesandcom.clickhouse.jdbc.DriverPropertiesmoved to public
API. (#2521) - [jdbc-v2] Implemented
isBeforeFirst,isAfterLast,isFirst,isLastmethods forResultSetandResultSetMetaData.
Improved test coverage forResultSetImpl. (#2530) - [jdbc-v2] Implemented
createArrayandcreateStructmethods forConnectioninterface. MethodcreateStruct
should be used to createTuplevalues andcreateArrayto create various arrays. (#2523) - [jdbc-v2] Implemented
setNetworkTimeoutofConnectioninterface. Used to fail fast when network operation fails. Related to
stale connection problem. (#2522) - [client-v2] Added support for JSON with predefined paths. Previously columns with definition like
JSON(a string, b.c Int32)
were not supported. (#2531)
Bug Fixes
- [jdbc-v2] Fixed issue creating array of tuples with
createArraymethod ofConnectioninterface.
(#2360) - [jdbc-v2] Fixed issue with reading nested arrays. (#2539)
- [jdbc-v2] Fixed issue with not shaded antlr4-runtime dependency. Potential problem for Apache Spark users. (#2553)
- [jdbc-v2] Fixed issue with parsing CTE for prepared statement. (#2551)
- [jdbc-v2] Fixed issue with parsing SQL containing view parameters. (#2547)
- [jdbc-v2] Fixed issue with
InsertSettingswhen two concurrent insert operations sharing same settings object may be insert
wrong columns or to a wrong table. (#2550) - [jdbc-v2] Fixed issue with batch insert when it is not cleared after execution. Now batch is cleared after execution even on failure. (#2548)
- [jdbc-v2] Fixed
DatabaseMetadataImplto return result set with defined by spec structure. Resolves issue for many database tools
relying on metadata. (#2396) - [jdbc-v2] Fixed
DatabaseMetadataImplto return empty result set where appropriate. (#2517) - [jdbc-v2] Fixed issue with verbose logging. (#2148)
- [client-v2] Fixed issue with reading JSON with predefined paths. (#2462)
Release v0.9.1
New Features
- [client-v2] Added option to set SNI for SSL connections. See
com.clickhouse.client.api.Client.Builder.sslSocketSNI(#2467) - [client-v2, jdbc-v2] Added support for
TimeandTime64data types. (#2487) - [client-v2] Added utility methods to format
Instantto a DB DateTime format. Seecom.clickhouse.client.api.DataTypeUtils.formatInstant(java.time.Instant, com.clickhouse.data.ClickHouseDataType)(#2501, #2456)
Improvements
- [client-v2] Improved exceptions and error handling. The
com.clickhouse.client.api.ClickHouseExceptionbecame a root for
ServerExceptionandClientException.com.clickhouse.client.api.ClickHouseException.isRetryableis added to determine if
exception caused in a retriable state. It means that catching such exception application may repeat operation to fix a
problem. (#2453) - [client-v2] Improved configuration handling. (#2470)
- [client-v2] Custom type hint for the client to make
ReaderandGenericRecordreturn specific types. For example,
collection instead ofArray. (#2476) - [client-v2] Added default port for HTTP and improved endpoint string validation - only one allowed. (#2489)
- [client-v2] Improved handling error response. (#2511)
Bug Fixes
- [client-v2] Fixed metrics to be parsed as Long to avoid integer overflow. Especially for elapsed time in nanos. (#2465)
- [client-v2] Fixed a bug with passing some server settings from JDBC to the Client. (#2359)
- [jdbc-v2] Fixed
DatabaseMetadatato return correct column type. (#2475) - [jdbc-v2] Fixed problem with JDBC URL when Database names that include dash
-were parsed wrong. (#2463) - [jdbc-v2] Fixed problem with nested arrays. Previously
ArrayValueobject was returned as element of a nested array.
After the fix array values contain primitive types. (#2464, #2340) - [jdbc-v2] Fixed JDBC Connection's
isValidmethod returningtrueall the time. (#2472) - [client-v2] Fixed problem with not closed response object when exception happens. That fixes connections leaking. (#1741)
- [jdbc-v2] Fixed a set of issue in
StatementImpl. (#2414) - [jdbc-v2] Fixed a set of issues in
PreparedStatementImpl. (#2418) - [jdbc-v2] Fixed multiple issues linked to parsing statements in JDBC. (#2450, #2451, #2461, #2500, #2493, #2478)
- [jdbc-v2] Fixed result set returning not a DB compliant date/time format. (#2408, #2448)
Release v0.9.0
Important Changes
- [repo] Artifacts
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. - [repo] Artifacts
jdbc-v2:all,jdbc-v2:http,jdbc-v2:shadedare not published anymore becausejdbc-v2is part ofclickhouse-jdbc:all.
Bug Fixes
- [jdbc-v2] Fixed parsing SQL with alias in
FROMclause when alias name is a keyword (#2427) - [client-v2] Fixed the issue when parameters are not passed if timeout is set. (#2436, #2096)
- [jdbc-v2] Fixed parser logging issue. Now parser uses same logger as the driver. (#2428)
- [jdbc-v2] Fixed parsing
CREATE USERstatements. Now parser recognises it correctly. (#2398) - [jdbc-v2] Fixed parsing different CTEs statements. (#2431, #2391, #2443)
- [jdbc-v2] Fixed parsing interval values. (#2429)
- [repo] Fixed running unit/integration tests in the CI. (#2430)
- [jdbc-v2] Fixed parsing parameters when function is in back quotes. (#2422)
- [jdbc-v2] Fixed
ResultSet#findColumnalways returning0. (#2375)
Misc
- [client-v2] Move all default values to
ClientConfigurationPropertiesenum. (#2269)
Docs
- [client-v2] Updated documentation of the configuration parameters and how to set server settings and custom HTTP headers.
Release v0.8.6
Improvements
- [jdbc-v2] Now using Antlr4 to parse SQL statements to get meta information about it.
Invalid SQL still possible to execute if logic able to get all required information. (#2351) - [jdbc-v2] Now possible to use
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
- [jdbc-v2] Fixed parsing prepared statement arguments. (#2348)
- [jdbc-v2] Fixed parsing role name when it contains
-. (#2325) - [jdbc-v2] Fixed failure when
INSERTdoesn't containVALUES. (#2283) - [jdbc-v2] Fixed parsing
INSERTstatement whenVALUESis in lower case. (#2354) - [client-v2] Fixed NPE when async operation is request while client was built without an executor.
In this case default JVM executor will be used. (#2355) - [client-v2, jdbc-v2] Fixed conversion of IP addresses. When IPv4 stored as IPv6 it is correctly converted
toInet6Address. Similar problem fixed for JDBC. (#2342) - [jdbc-v2] Fixed changing DB schema (DB name) on connection when
USEstatement executed. (#2137) - [client-v2] Fixed serializing POJO with primitive
booleanfields. (#2248)
Release v0.8.5
Improvements
- [jdbc-v2] Added debug output for final SQL. (#2249)
Bug Fixes
- [client-v2] Fixed creating TableSchema for materialized views. It resolves issues with POJO serde. (#2118,
#2025) - [client-v2, jdbc-v2] Fixed handling
NullableinsideSimpleAggregateFunctioncolumns. (#2110) - [jdbc-v2] Fixed problem with server info request. It is fetched now when timezone of the server is set. (#2191)
- [jdbc-v2] Fixed null response for
getIndexInfo(). Empty Result Set is returned. (#2286) - [jdbc-v2] Fixed wrong
falseresponse inDataBaseMetadata.supportsBatchUpdates(). Returnstruenow. Please note that
no update is supported for result sets. - [jdbc-v2] Fixed handling UUID data type in PreparedStatement. (#2327)
- [jdbc-v2] Fixed unsigned integer type matching.
UInt8,UInt16,UInt32,UInt64,UInt128,UInt256are presented as
short,int,long,BigInteger,BigInteger,BigIntegercorrespondingly. SQLType for them isOTHERbecause
JDBC (as well as Java) doesn't provide good mapping for unsigned integers. (#2333) - [jdbc-v2] Disallowed to call method from
Statementinterface onPreparedStatementinstance according to the JDBC spec. (#2339)
Release v0.8.4
Examples
- [jdbc-v2] - JPA example added. (#2301)
Bug Fixes
- [jdbc-v2] Added implementation of
ResultSetMetaData.getColumnClassName()to return information
about class name of the value stored in a result. (#2112) - [client-v2] Fixed NPE when
Client.queryAllused withINSERTstatement because internallycolumnsvariable
was accessed and was null. (#2150) - [jdbc-v2] Fixed NPE when
ssl=truewas passed via an connection URL. (#2206) - [jdbc-v2] Fixed sending correct driver version. Problem occurs because context classloader had no access to
a resource file with versions. (#2245) - [jdbc-v2] Fixed incorrect flag for Array values when reading result set. (#2266)
- [jdbc-v2] Fixed parsing parameters in PreparedStatement for cases when '?' is within quotes or similar. (#2290)
- [jdbc-v2] Added implementation for
com.clickhouse.jdbc.PreparedStatementImpl#getMetaData.
Complete metadata is returned only after statement execution. Partial metadata is returned before execution
of the statement. (#2292) - [jdbc-v2] Fixed
clearParametersinPreparedStatementImplto correctly reset parameters array. (#2299) - [jdbc-v2] Fixed logging. (#2303)
Release v0.8.3
Improvements
- [client-v2] Support for native LZ4 compression (#2274)
Bug Fixes
- [jdbc-v2] Fixed several issues with reading database metadata in JDBC driver. (#2282)
- [jdbc-v2] Fixed settings client name in JDBC. (#2233)
- [client-v2] Fixed reading data from columns defined as
Nullable(FixedString(N)). (#2218) - [jdbc-v2] Fixed SQL parser failure to parse SQL statement with comments (#2217)
- [client-v2] Fixed issue with excessive logging (#2201)
- [jdbc-v2] Fixed handling IP addresses (#2140)
- [jdbc] - Fixed missing LZ4 dependency in shaded package (#2275)
Release v0.8.2
Bug Fixes
[jdbc-v2] - Fixed a bug affecting JDBC insert performance. (#2165)
[client-v1] - Removed unnecessary object creation and added executor pool configuration (#2164)
Miscellaneous
[client-v1] - Deprecated the old client, though it is still available. We've not yet set a date for its removal, this more serves as a head's up.
Release v0.8.1
New Features
- [client-v2] - Added support for Variant Data Type for RowBinary format. Can be read into a POJO or using a reader.
Writing is supported only for POJO. (#2130) - [client-v2] - Added support for Dynamic Data Type for RowBinary format. Can be read into a POJO or using a reader.
Writing is supported only for POJO. (#2130) - [client-v2] - Added support for JSON Data Type for RowBinary format. Can be read into a POJO or using a reader.
Writing is supported only for POJO. (#2130) - [client-v2] - Added support for
ZonedDateTimein POJO serde. (#2117) - [client-v2] - Added suport for micrometer metrics for Apache HTTP client connection pool. It is now possible to get metrics registered
in micrometer registry by callingcom.clickhouse.client.api.Client.Builder.registerClientMetrics(registry, groupName). (#1901)
Bug Fixes
- [client-v2] - Fixed
getTableSchema(tableName, databaseName)now it doesn't ignore database name. (#2139) - [client-v2] - Fixed
returnGeneratedValuesto not throw an exception. Keep in mind that ClickHouse doesn't support
returning anything in response forINSERTstatements. This change was done just to make client usable with certain frameworks. (#2121) - [jdbc-v2] - Fixed changing database by
USEstatement. (#2137) - [jbdc-v2] - Fixed
ResultSetMetadata.getColumnClassName()to return null instead of throwing exception. This change is done only
to allow certain frameworks work with the client. (#2112) - [jdbc-v2] - Fixed using statements with
WITHin JDBC v2. Previously was causing NPE. (#2132) - [repo] - Fixed failing Test in Windows when attempting to locate files with reserved characters in the file path. (#2114)