feat: spannertest-changestreams#14381
Conversation
…annertest. I've tried to implement key features to support in-memory testing of change streams.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request implements change stream support within the spannertest emulator, enabling the creation, alteration, and deletion of change streams via DDL. It introduces mutation logging for all write operations (Insert, Update, Delete, Replace) and implements the READ_ table-valued function (TVF) to allow users to query change records. The changes also include updates to the spansql parser to handle TVF syntax and provide exported Go types for client-side decoding. Feedback identifies a critical bug where unconditional transaction lookups in ExecuteSql would break standard queries, and a logic error in the change stream iterator that could incorrectly merge records from distinct transactions sharing the same commit timestamp.
…ries do not fail if no transaction id is present
…estamp end up in different changerecord rows
Initial implementation thoughts for implementing Change Streams in spannertest. I've tried to implement key features to support in-memory testing of change streams.