-
Notifications
You must be signed in to change notification settings - Fork 547
fix: Don't create duplicate columns for unique constraints #12518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
See #12440 (comment) for a table that reproduces the issue |
|
Tricky, nice find! Would it be feasible / easy to add a test case for this you think? |
Good point, added a test in 8b4e25c (fixed the lint warnings in a separate commit) |
| t.Fatalf("expected record to have %d columns, got %d", len(expected), actualRecord.NumCols()) | ||
| } | ||
| schema := actualRecord.Schema() | ||
| sc := actualRecord.Schema() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to prevent shadowing the new import "github.com/cloudquery/plugin-sdk/v4/schema"
🤖 I have created a release *beep* *boop* --- ## [2.0.3](plugins-source-postgresql-v2.0.2...plugins-source-postgresql-v2.0.3) (2023-07-25) ### Bug Fixes * **deps:** Update github.com/cloudquery/arrow/go/v13 digest to 10df4b9 ([#12443](#12443)) ([e385283](e385283)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.2.3 ([#12307](#12307)) ([8f14e4d](8f14e4d)) * Don't create duplicate columns for unique constraints ([#12518](#12518)) ([99e7ad9](99e7ad9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Summary
Fixes #12440
We can't use
likeotherwise an ordinal of1matches bothindkey = 11andindkey = 1