feat(dest-mysql): Handle all MySQL types#11360
Merged
kodiakhq[bot] merged 3 commits intocloudquery:mainfrom Jun 7, 2023
Merged
feat(dest-mysql): Handle all MySQL types#11360kodiakhq[bot] merged 3 commits intocloudquery:mainfrom
kodiakhq[bot] merged 3 commits intocloudquery:mainfrom
Conversation
hermanschaaf
reviewed
Jun 7, 2023
| if strings.HasPrefix(sqlType, "datetime") { | ||
| return arrow.FixedWidthTypes.Timestamp_us | ||
| } | ||
| if strings.HasPrefix(sqlType, "decimal") || strings.HasPrefix(sqlType, "numeric") { |
Contributor
There was a problem hiding this comment.
It looks like this might fail in the future if we start supporting general array types via Arrow, but right now this is not yet supported on the source side so we're okay. It'll be a bigger change in any case
hermanschaaf
approved these changes
Jun 7, 2023
kodiakhq bot
pushed a commit
that referenced
this pull request
Jun 7, 2023
🤖 I have created a release *beep* *boop* --- ## [2.2.0](plugins-destination-mysql-v2.1.1...plugins-destination-mysql-v2.2.0) (2023-06-07) ### Features * **dest-mysql:** Handle all MySQL types ([#11360](#11360)) ([f0ec33e](f0ec33e)) ### Bug Fixes * **deps:** Update github.com/cloudquery/arrow/go/v13 digest to 90670b8 ([#11279](#11279)) ([a6cdc91](a6cdc91)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
kodiakhq bot
pushed a commit
that referenced
this pull request
Jun 12, 2023
#### Summary This is a follow up to #11360 to ensure `blob/text` SQL types have their PK configured correctly. It also has another PK fix related to the arrow migration to avoid creating a duplicate index for columns that have all `Unique,NotNull,PrimaryKey` flags set <!--
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #11325
Same as #9143 for MySQL destination.
Type handling taken from https://github.com/cloudquery/cloudquery/pull/11214/files#diff-c4ee14fff2e1c7cbea7dfcf122879522b5d817aaa041f54564696293b1c6bc30R90.
Once we have the MySQL source migrated to v3 we can add support for more granular types like
char(x)or other fixed size types (doing that will be a breaking change).