fix(postgres): fix PG->PG schemaqual, NUMERIC handling during schema changes#3940
fix(postgres): fix PG->PG schemaqual, NUMERIC handling during schema changes#3940heavycrystal merged 4 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves Postgres schema-delta replay behavior (notably for PG→PG) by adding schema qualification for added-column types and improving NUMERIC typmod handling, and updates schema-delta tests to run against both Q and PG type systems.
Changes:
- Add per-type-system field conversion helpers for schema-delta tests and extend test coverage to run for both
TypeSystem_QandTypeSystem_PG. - Update schema-delta replay to schema-qualify PG types during
ALTER TABLE ... ADD COLUMNoperations. - Add NUMERIC typmod formatting during schema-delta replay.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| flow/connectors/postgres/schema_delta_test_constants.go | Adds type-system conversion helpers and extends test field constants (including NUMERIC typmod). |
| flow/connectors/postgres/postgres_schema_delta_test.go | Runs schema-delta tests for both Q and PG type systems using the new conversion helper. |
| flow/connectors/postgres/postgres.go | Updates schema-delta replay to schema-qualify PG types and apply NUMERIC typmod formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| s.t.Run(system.String(), func(_ *testing.T) { | ||
| s.testSimpleAddColumn(system) |
There was a problem hiding this comment.
These subtests ignore the *testing.T passed into Run and continue to use s.t inside the helper methods. That prevents proper subtest scoping (failures/logs get attributed to the parent test, and helpers like t.Parallel() can’t be used safely). Consider passing the subtest t into the helper (or cloning the suite with t: subT) and using it for require/context.
| s.t.Run(system.String(), func(_ *testing.T) { | |
| s.testSimpleAddColumn(system) | |
| s.t.Run(system.String(), func(subT *testing.T) { | |
| subSuite := s | |
| subSuite.t = subT | |
| subSuite.testSimpleAddColumn(system) |
❌ 2 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
89bee81 to
9252ea5
Compare
schema qualification for types adding in schema changes in PG->PG
numeric typmod handling
all schema change tests now use both type systems