Skip to content

Commit

Permalink
Merge pull request #1346 from zhicwu/main
Browse files Browse the repository at this point in the history
Prepare for 0.4.6 release.
  • Loading branch information
zhicwu authored May 2, 2023
2 parents a068fc7 + 230f199 commit dd91e17
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Two new options(use_compilation & max_mapper_cache) reserved for future usage.

### Bug Fixes
* Too many socket fds generated by Apache HttpClient.
* NoClassDefFoundError with clickhouse-apache-http-client-jdbc. [#1319](https://github.com/ClickHouse/clickhouse-java/issues/1319)
* Nested array in tuple array is incorrectly deserialized. [#1324](https://github.com/ClickHouse/clickhouse-java/issues/1324)
* client certificate password exposure in exception. [#1331](https://github.com/ClickHouse/clickhouse-java/issues/1331)
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ Java libraries for connecting to ClickHouse and processing data in various forma
| Transaction | Transaction | :white_check_mark: | supported since 0.3.2-patch11, use ClickHouse 22.7+ for native implicit transaction support |
| | Savepoint | :x: | |
| | XAConnection | :x: | |
| Misc. | Centralized Configuration | :white_check_mark: | supported since 0.4.2, limited to JDBC driver and requires custom server setting `custom_jdbc_config` for all connected JDBC clients - [#1290](../../pull/1290) |
| | INFILE & OUTFILE | :white_check_mark: | supported since 0.4.2, limited to JDBC driver and requires `localFile` option - [#1291](../../pull/1291) |
| Misc. | Centralized Configuration | :white_check_mark: | supported since 0.4.2, limited to JDBC driver and requires custom server setting `custom_jdbc_config` for all connected JDBC clients - [#1290](../../pull/1290) |
| | INFILE & OUTFILE | :white_check_mark: | supported since 0.4.2, limited to JDBC driver and requires `localFile` option - [#1291](../../pull/1291) |
| | Implicit Type Conversion | :white_check_mark: | String/number to Date/Time/Timestamp and more |
| | Object mapping | :white_check_mark: | supported since 0.4.6, slow and limited to simple data types |

## Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static ClickHouseHttpConnection createConnection(ClickHouseNode server, C
} catch (IOException e) {
throw e;
} catch (Throwable t) {
log.warn("Error when creating http client %s, will use HTTP_URL_CONNECTION", provider.name(), t);
log.warn("Error when creating http client %s, will use HTTP_URL_CONNECTION", provider, t);
return new HttpUrlConnectionImpl(server, request, executor);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public enum ClickHouseHttpOption implements ClickHouseOption {
* Whether to enable keep-alive or not.
*/
KEEP_ALIVE("http_keep_alive", true, "Whether to use keep-alive or not"),
/**
* Max open connections apply with Apache HttpClient only.
*/
MAX_OPEN_CONNECTIONS("max_open_connections", 10, "Max open connections apply with Apache HttpClient only."),
/**
* Whether to receive information about the progress of a query in response
* headers.
Expand All @@ -47,13 +51,7 @@ public enum ClickHouseHttpOption implements ClickHouseOption {
/**
* Web context.
*/
WEB_CONTEXT("web_context", "/", "Web context."),

/**
* Max connections of ApacheHttpConnectionImpl
*/
MAX_OPEN_CONNECTIONS("max_open_connections", 10,
"max open connections for a ClickHouseConnection");
WEB_CONTEXT("web_context", "/", "Web context.");

private final String key;
private final Serializable defaultValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ final long read(Options options) throws ClickHouseException, SQLException {
if (options.hasFile()) {
try {
response.getInputStream().setCopyToTarget(
!"-".equals(options.file) ? new FileOutputStream(options.file, false)
!"-".equals(options.file) ? new FileOutputStream(options.file, false) // NOSONAR
: System.out); // NOSONAR
} catch (IOException e) {
throw ClickHouseException.of(e, server);
Expand Down

0 comments on commit dd91e17

Please sign in to comment.