-
Notifications
You must be signed in to change notification settings - Fork 35
ResultSetReader fixes and improvements #584
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
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release_v2.4.0 #584 +/- ##
====================================================
+ Coverage 65.16% 65.86% +0.70%
- Complexity 2734 2841 +107
====================================================
Files 344 344
Lines 14323 14403 +80
Branches 1481 1488 +7
====================================================
+ Hits 9334 9487 +153
+ Misses 4322 4252 -70
+ Partials 667 664 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 pull request implements fixes and improvements to the ResultSetReader and related value reading functionality in the YDB Java SDK. The changes aim to improve error handling, simplify optional value reading logic, enhance toString output for bytes/yson values, and improve test coverage.
Changes:
- Refactored optional value reader handling by consolidating logic into ProtoOptionalValueReader and removing the nested Optional class from ProtoPrimitiveValueReader
- Improved PrimitiveValue.Bytes toString output to use hex format with length information instead of octal escape sequences
- Enhanced ResultSetReader state management and error messages for better clarity
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 25 comments.
Show a summary per file
| File | Description |
|---|---|
| table/src/test/java/tech/ydb/table/values/PrimitiveValueTest.java | Added comprehensive tests for bytes and yson equality, toString, and getter behavior |
| table/src/test/java/tech/ydb/table/result/impl/ProtoValueReaderTest.java | New comprehensive test file covering type checking and null handling for all value types |
| table/src/test/java/tech/ydb/table/result/impl/OptionalReaderTest.java | Updated tests to reflect new error messages and null value handling |
| table/src/test/java/tech/ydb/table/result/ResultSetReaderTest.java | Added tests for column access, iteration, and boundary conditions |
| table/src/test/java/tech/ydb/table/integration/ValuesReadTest.java | Added integration tests for null handling and timezone date types |
| table/src/main/java/tech/ydb/table/values/proto/ProtoType.java | Removed unused toString method |
| table/src/main/java/tech/ydb/table/values/PrimitiveValue.java | Refactored Bytes class to use ByteString internally and hex toString format |
| table/src/main/java/tech/ydb/table/result/impl/ProtoValueReaders.java | Simplified optional reader creation logic, deprecated forResultSets method |
| table/src/main/java/tech/ydb/table/result/impl/ProtoResultSetReader.java | Improved state management with explicit before-first and after-last handling |
| table/src/main/java/tech/ydb/table/result/impl/ProtoPrimitiveValueReader.java | Improved error messages with type names, removed nested Optional class |
| table/src/main/java/tech/ydb/table/result/impl/ProtoOptionalValueReader.java | Added delegating methods with null checks for all value types |
| table/src/main/java/tech/ydb/table/result/impl/AbstractValueReader.java | Added missing @OverRide annotations and improved error messages |
| table/src/main/java/tech/ydb/table/result/ResultSetReader.java | Enhanced JavaDoc documentation for all methods |
| query/src/test/java/tech/ydb/query/tools/QueryReaderTest.java | Updated tests for new setRowIndex behavior |
| query/src/main/java/tech/ydb/query/tools/QueryReader.java | Fixed setRowIndex to properly handle negative indices and boundary conditions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.