Skip to content

Conversation

@chernser
Copy link
Contributor

Summary

Checklist

@vercel
Copy link

vercel bot commented Nov 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
clickhouse-docs Error Error Comment Dec 6, 2025 7:48am
clickhouse-docs-jp Building Building Preview Comment Dec 6, 2025 7:48am
2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
clickhouse-docs-ru Ignored Ignored Preview Dec 6, 2025 7:48am
clickhouse-docs-zh Ignored Ignored Preview Dec 6, 2025 7:48am

Copy link
Contributor

@laeg laeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chernser thank you for putting this together!! 🙏

@Blargian lets find some time to think through this in relation to the future docs build. seems like we need nicer ways to handle configuration options in programmatic settings.

import TOCInline from '@theme/TOCInline';


<TOCInline toc={toc} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets move this into the righthand navbar as it takes up a lot of the documentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha! this is not so easy because we are using snippets. They break navbar.
I've spent two hours playing around with different configs but failed miserably.
I suggest we address it later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Blargian
I have a problem that when I create two separate pages under lets say JDBC I get one of them without any bars - just like a standalone page. I'm sure there is something in how these pages are defined in sidebars config.
But I failed to find a way to make it work. I've tried replicate approach from other places but no luck.
If you know the problem I will appreciate any help here.

Thanks!

Table below shows what old options are supported in the new client and there new meaning.
✔ - supported
✗ - dropped
| V1 Configuration | Matching V2 Builder Method | Comments |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there is a nicer way to display this, the scroll is hard. @Blargian do you have any ideas of what we could do here?

@chernser is there a way to group them and break this up into digestible chunks/smaller tables to make it a bit more readable 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to collocate them in groups.

If the page is large, we can consider moving it to a dedicated page

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I can group them by function.

| `addEndpoint(String endpoint)` | - `endpoint` - URL formatted a server address. | Adds a server endpoint to list of available servers. Currently only one endpoint is supported. <br/> <br/> Default: `none` <br/> Enum: `none` <br/> Key: `none` |
| `addEndpoint(Protocol protocol, String host, int port, boolean secure)` | - `protocol` - connection protocol `com.clickhouse.client.api.enums.Protocol#HTTP`.<br />- `host` - IP or hostname of a server.<br />- `secure` - if communication should use secure version of the protocol (HTTPS) | Adds a server endpoint to list of available servers. Currently only one endpoint is supported. <br/> <br/> Default: `none` <br/> Enum: `none` <br/> Key: `none` |
| `setOption(String key, String value)` | - `key` - String key of the client configuration option.<br /> - `value` - String value of the option | Sets raw value of client options. Useful when reading configuration from properties files. |
| `setOption(String key, String value)` | - `key` - String key of the client configuration option.<br /> - `value` - String value of the option | Sets raw value of client options. Useful when reading configuration from properties files. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here @Blargian, the docs are a little tough to read if you havent got a wide screen


:::note Server Settings

All server settings should be prefixed with `clickhouse_setting_` (same as for the client [configuration](/integrations/language-clients/java/client#server-settings)).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. We need to add this to the client's list as it's been a constant source of customer complaints.
  2. What can we do to make this breaking change self-servable? For example, detect unrecognized settings and log a warning to use clickhouse_setting_ prefix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package.json Outdated
"form-data": "^4.0.4"
}
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure it needs to be committed to the repo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right.
@Blargian is it possible to move all dynamic files that part of a build under specific folder?
We usually use build or target so we can exclude them from git staging.

Thanks!

@dhtclk dhtclk added the Don't Merge Don't merge yet label Nov 17, 2025
@chernser chernser requested a review from mshustov November 17, 2025 19:03
@chernser
Copy link
Contributor Author

chernser commented Dec 1, 2025

@Blargian many thanks for grouping configuration parameters!

@chernser chernser marked this pull request as ready for review December 1, 2025 19:18
@chernser chernser requested review from a team as code owners December 1, 2025 19:18
@chernser chernser changed the title [DO NOT MERGE] Update java docs Dec 2025 Update java docs Dec 2025 Dec 1, 2025
.build();
```

`Client` is `AutoCloseable` and should be closed when not needed anymore.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be closed

Should we extend the example above to include this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true for older client. I will add something about resource management.

## Client Configuration {#client-configuration}

<Tabs groupId="client-config">
<TabItem value="connection" label="Connection & Endpoints">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a blocker for the PR, @Blargian what can we do to make the table easy readable? right now, the Default column might be disproportionately large

Image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

...
}
```
When options are set via `setOption` method (either the `Client.Builder` or operation settings class) then server settings name should be prefixed with `clickhouse_setting_`. The `com.clickhouse.client.api.ClientConfigProperties#serverSetting()` may be handy in this case.
Copy link
Member

@mshustov mshustov Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we wrap this wrapper into an note snippet?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note snipped I think is quite heavy. I've put ⚠️ to attract attention to the following information.

- Client V2 `async` settings is `off` by default. It means no extra threads and more application control over client. This setting should be `off` for majority of use cases. Enabling `async` will create a separate thread for a request. It only make sense when using application controlled
executor (see `com.clickhouse.client.api.Client.Builder#setSharedOperationExecutor`)

### Writing Data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there an example in the repository comparing the snippets back to back? like

examples/insert_v1.java
examples/insert_v2.java

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

| `ClickHouseClientOption#RETRY` | `Client.Builder#setMaxRetries` | See also `retryOnFailures` |
| `ClickHouseHttpOption#AHC_RETRY_ON_FAILURE` | `Client.Builder#retryOnFailures` | |
| `ClickHouseClientOption#FAILOVER` || |
| `ClickHouseClientOption#REPEAT_ON_SESSION_LOCK` || |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one of the problem with TabIteams, is that none Cmd + F nor search able to find the settings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be we need to extract reference information to another page?
So any client doc will be in two parts: Narrative about client, its features and reference information.
GCP is a good example.

We recommend using the latest java client directly if performance/direct access is critical.
:::

## Changes from 0.7.x {#changes-from-07x}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be Migration guide?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


## Supported data types {#supported-data-types}

JDBC Driver supports the same data formats as the underlying [java client](/integrations/language-clients/java/client/client.mdx).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be a link to a specific section of the client documentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

## Supplying Credentials and Settings {#supplying-credentials-and-settings}

```java showLineNumbers
String url = "jdbc:ch://localhost:8123?jdbc_ignore_unsupported_values=true&socket_timeout=10";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add an example of a server setting configuration?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

queryParams.put("param1", 2);

try (QueryResponse response =
client.query("SELECT * FROM " + table + " WHERE col1 >= {param1:UInt32}", queryParams, new QuerySettings()).get()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should a section for query parametrisation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we need.

@chernser chernser marked this pull request as draft December 3, 2025 06:51
@chernser
Copy link
Contributor Author

chernser commented Dec 3, 2025

@mshustov thank you for the review! I will correct doc this week and will add more information. So I've returned it to the draft state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Don't Merge Don't merge yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants