Skip to content

Conversation

@chernser
Copy link
Contributor

@chernser chernser commented Jun 4, 2025

Summary

  • moves setting defaults the the client builder constructor
  • retires Client.Builder#useNewImplementation()

Closes #2269

Checklist

Delete items not relevant to your PR:

@chernser chernser requested review from Copilot and mzitnik June 4, 2025 21:01
Copy link
Contributor

@windsurf-bot windsurf-bot bot left a comment

Choose a reason for hiding this comment

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

1 file skipped due to size limits:
  • client-v2/src/test/java/com/clickhouse/client/query/QueryTests.java

💡 To request another review, post a new comment with "/windsurf-review".

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR centralizes client default settings into the ClientConfigProperties enum and removes the deprecated useNewImplementation flag from the builder.

  • Moved all default values into ClientConfigProperties and initialize them in the Builder constructor
  • Removed useNewImplementation(...) and its related logic
  • Updated tests to drop useNewImplementation calls

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
client-v2/src/main/java/com/clickhouse/client/api/ClientConfigProperties.java Added defaultValue for enum entries, removed mutable defaults
client-v2/src/main/java/com/clickhouse/client/api/Client.java Removed useNewImplementation parameter and default-setting code
client-v2/src/test/java/com/clickhouse/client/QueryTests.java Dropped .useNewImplementation(...) call
client-v2/src/test/java/com/clickhouse/client/metadata/MetadataTests.java Dropped .useNewImplementation(...) call
client-v2/src/test/java/com/clickhouse/client/command/CommandTests.java Dropped .useNewImplementation(...) call
client-v2/src/test/java/com/clickhouse/client/ProxyTests.java Dropped .useNewImplementation(...) call
client-v2/src/test/java/com/clickhouse/client/HttpTransportTests.java Dropped .useNewImplementation(...) calls
client-v2/src/test/java/com/clickhouse/client/ClientTests.java Added new coverage for defaults and removed useNewImplementation

Copy link
Contributor

@mzitnik mzitnik left a comment

Choose a reason for hiding this comment

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

@chernser
LGTM, since we removed useNewImplementation method, it is a breaking change. I think we have two options

  • Mention in a migration guide.
  • Add a deprecation on the method and remove it later

@chernser
Copy link
Contributor Author

chernser commented Jun 5, 2025

@mzitnik
yes it is kind of a breaking change and 0.9.0 is a good chance to remove it.
I will mention in the change log. Besides that it was deprecated for long enough.

@chernser chernser merged commit 3045b4e into main Jun 5, 2025
41 of 45 checks passed
@chernser chernser deleted the fix_setting_default_parameters branch June 5, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[client-v2] Move defaults to ClientConfigurationProperties

3 participants