You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds support for the Rest column described in the Raw Tables roadmap.
When the Rest column is used, we create a set of all other columns matched in a statement. During the sync process, we then match over the received row and build a JSON object containing values from the source row that aren't matched by a column in the raw table.
Having a rest column in the raw table can help with some migrations that add columns, because synced values would be available in that table without having to re-sync.
are the rest fields parsed and re-serialized, or do we just keep the serialized form as-is
We've already been deserializing each oplog row as a JSON object to be able to extract individual columns. Building the value for rest reuses that parsed object instead of deserializing again, if that's what you mean?
We deserialize into a Map<String, serde_json::Value> - that allocates for string values where we could get away with an &str reference if the string doesn't contain escape characters. So there is some potential for optimizations here, but I don't expect this PR to make matters worse.
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
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 adds support for the
Restcolumn described in the Raw Tables roadmap.When the
Restcolumn is used, we create a set of all other columns matched in a statement. During the sync process, we then match over the received row and build a JSON object containing values from the source row that aren't matched by a column in the raw table.Having a rest column in the raw table can help with some migrations that add columns, because synced values would be available in that table without having to re-sync.