cockroachdb / replicator

replicator is a toolkit for ingesting logical replication feeds into a CockroachDB cluster
Apache License 2.0
60 stars 24 forks source link

sequencer: updated the script test so that it uses the new GetRowWithPredicate method #1032

Closed ryanluu12345 closed 1 month ago

ryanluu12345 commented 1 month ago

Previously, product specific switch cases were used to determine how to build a query for the target database in the script test. We want to commonize this to a helper that can take care of the product specific logic and execute the query to find the row counts based on predicate.

Integrated this into the script test after implementing.

Resolves: #689 Release Note: None


This change is Reviewable

ryanluu12345 commented 1 month ago

Left some comments here and also notes about my implementation thought process. I think once we land on something we're mutually happy with, I'll go ahead and make these updates to the other test locations:

I searched the repo for this: SELECT count(*) FROM %s

Found places that need some fixing: