Skip to content

Conversation

@simolus3
Copy link
Contributor

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.

@simolus3 simolus3 requested a review from rkistner January 23, 2026 17:12
Copy link
Contributor

@rkistner rkistner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for my own curiosity - are the rest fields parsed and re-serialized, or do we just keep the serialized form as-is?

@simolus3
Copy link
Contributor Author

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.

@simolus3 simolus3 merged commit ffab710 into main Jan 29, 2026
25 checks passed
@simolus3 simolus3 deleted the raw-table-rest-column branch January 29, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants