refactor(firestore): Merge BsonBinaryData into Blob#13190
Open
wu-hui wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request merges the BsonBinaryData class into the Blob class, enabling Blob to represent both native binary data and BSON binary data with subtypes. The Firestore ordering logic has been updated to treat both types as BLOBs with a unified comparison mechanism. Review feedback suggests optimizing the blob comparison logic to avoid unnecessary memory allocations, removing the redundant isBson field, addressing inconsistencies in the toProto() method, and improving the efficiency of the toString() implementation for large data blobs.
adcf75b to
c76cfd9
Compare
This PR stacks on PR #2378 and implements the refactoring to merge BsonBinaryData into Blob, as requested by the user.
82eb2b8 to
e035c55
Compare
…BSON binaries as native bytes - Remove `isBson` property and field from the `Blob` class. - Update `UserDataConverter` to serialize BSON binary subtype 0 as native `bytesValue` instead of wrapped map. - Add unit tests verifying BSON binary subtype 0 roundtrips as standard bytes/Blob. - Add local query ordering tests verifying BSON binary subtype 1 comparison and sorting order relative to native bytes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR stacks on PR #2378 and implements the refactoring to merge BsonBinaryData into Blob, as requested by the user.