-
Notifications
You must be signed in to change notification settings - Fork 604
JDBC Driver class changes #2588
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
Client V2 CoverageCoverage Report
Class Coverage
|
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 refactors the JDBC driver version handling system to properly parse and store major/minor version numbers using bit-shifted integer encoding. The changes address issue #2410 by implementing a new version parsing method that encodes the major version as (major << 16) | minor and uses the patch version as the minor version for JDBC compliance.
- Implemented new
parseVersion()
method with bit-shifted encoding for version numbers - Refactored driver version access from public static fields to private fields with getter methods
- Added comprehensive test coverage for version parsing with various version formats
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
jdbc-v2/src/main/java/com/clickhouse/jdbc/Driver.java | Implemented new version parsing logic with bit-shifted encoding and added getter method |
jdbc-v2/src/test/java/com/clickhouse/jdbc/DriverTest.java | Added comprehensive test cases for version parsing and updated existing version tests |
jdbc-v2/src/main/java/com/clickhouse/jdbc/metadata/DatabaseMetaDataImpl.java | Updated to use new driver version getter method |
jdbc-v2/src/main/java/com/clickhouse/jdbc/internal/JdbcConfiguration.java | Updated to use new driver version getter method |
jdbc-v2/src/main/java/com/clickhouse/jdbc/ConnectionImpl.java | Updated to use new driver version getter method |
client-v2/src/test/java/com/clickhouse/client/internal/SmallTests.java | Cleaned up test file by removing unused test methods |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
/windsurf review |
/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.
Other comments (1)
- jdbc-v2/src/main/java/com/clickhouse/jdbc/Driver.java (171-171) The return value of `parseVersion` is confusing - it returns `[majorVersion, patch]` where `majorVersion` is actually an encoded combination of major and minor versions. This makes the method name misleading and the return value hard to understand. Consider returning a more explicit structure like `[major, minor, patch]` or creating a dedicated version class.
💡 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.
LGTM
@chernser did you see windsurf comments?
@mzitnik |
I have approved, but please take a look at the windsurf comments |
JDBC V2 CoverageCoverage Report
Class Coverage
|
JDBC V1 CoverageCoverage Report
Class Coverage
|
Client V1 CoverageCoverage Report
Class Coverage
|
|
Summary
Closes #2410
Checklist
Delete items not relevant to your PR: