-
Notifications
You must be signed in to change notification settings - Fork 35
Updated PrimitiveValue.Bytes implementation #587
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 #587 +/- ##
====================================================
+ Coverage 65.73% 65.77% +0.04%
- Complexity 2826 2831 +5
====================================================
Files 344 344
Lines 14410 14395 -15
Branches 1497 1484 -13
====================================================
- Hits 9472 9468 -4
+ Misses 4268 4264 -4
+ Partials 670 663 -7 ☔ 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 PR updates the PrimitiveValue.Bytes/Yson implementation to store data as ByteString, revises toString() output to a hex-based format with truncation, and adjusts tests to validate the new behavior.
Changes:
- Reworked
PrimitiveValuebyte-backed primitives to useByteStringinternally and added a cachedbyte[]for “unsafe” access. - Changed
Bytes/YsontoString()from octal-escaped string output toType[len=... content=...]with truncation. - Updated/expanded unit tests for equality, identity semantics of getters, and
toString()formatting; madeProtoValueReaderTestbytes fixture encoding deterministic.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
table/src/main/java/tech/ydb/table/values/PrimitiveValue.java |
Updates Bytes internal representation, caching, toString(), and related constructors. |
table/src/test/java/tech/ydb/table/values/PrimitiveValueTest.java |
Adjusts tests to new toString() and adds assertions around equals/identity/copy semantics. |
table/src/test/java/tech/ydb/table/result/impl/ProtoValueReaderTest.java |
Makes the bytes test input deterministic (no platform default charset). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ac32764 to
8f08641
Compare
8f08641 to
49cf8af
Compare
No description provided.