FIX: sort strings in UTF-8 encoded byte order#8691
Merged
Conversation
🦋 Changeset detectedLatest commit: 02a470b The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Collaborator
Size Report 1Affected Products
Test Logs |
Collaborator
Size Analysis Report 1This report is too large (475,370 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
milaGGL
commented
Jan 10, 2025
Contributor
|
For PRs, please add information to the PR summary as to why this change is being made including any internal b/ tickets or any external GH issues that are associated with it so, later, if something goes wrong, we can reference the information. Also could you add a patch-level changeset since this a behavioral change? |
ehsannas
approved these changes
Feb 4, 2025
hsubox76
approved these changes
Feb 4, 2025
Contributor
Vertex AI Mock Responses Check
|
This was referenced Feb 10, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Strings should be sorted in UTF-8 encoded byte order. Public document: https://cloud.google.com/firestore/docs/concepts/data-types#data_types
SDK sorts strings using built in comparator method, which sorts lexicographically, and leads to mismatch between server and sdk when special characters are present. This PR fixes the string order mismatches on document field, map key, and document key.
Remaining bug: when document keys include special characters, reading docs from IndexedDB with order fields (other than document ID) will miss some documents as indexedDB uses lexicographical order.
b/329441702