-
Notifications
You must be signed in to change notification settings - Fork 614
[client-v2] Move default values to Enum #2423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ng them in builder constructor
There was a problem hiding this 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".
There was a problem hiding this 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
ClientConfigPropertiesand initialize them in theBuilderconstructor - Removed
useNewImplementation(...)and its related logic - Updated tests to drop
useNewImplementationcalls
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 |
There was a problem hiding this 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
|
@mzitnik |
Summary
Client.Builder#useNewImplementation()Closes #2269
Checklist
Delete items not relevant to your PR: