feat(postgresql): Update PG to SDK V3 native arrow support#10783
Merged
yevgenypats merged 18 commits intomainfrom May 18, 2023
Merged
feat(postgresql): Update PG to SDK V3 native arrow support#10783yevgenypats merged 18 commits intomainfrom
yevgenypats merged 18 commits intomainfrom
Conversation
This was referenced May 14, 2023
ce950e4 to
c7a2d12
Compare
kodiakhq bot
pushed a commit
to cloudquery/plugin-sdk
that referenced
this pull request
May 15, 2023
Few notes: - Most of the code here was removed in #854 to prevent accidental use before it was ready - Sources moved to use the new `schema.Table` which means use of `arrow.DataType` instead of our old `ValueType` - Protocol in sources and destinations are upgraded to use native arrow format (sources v2 and dest v1) - https://github.com/cloudquery/plugin-pb-go - Introduces a new `scalar` package which is mostly used by our "managed" sources and basically our old cqtypes just now using arrow types (which also support nesting). This will hopefully go upstream one day but I don't think we should block on that as the upstream package is not a fit right now and will take time for such refactor to make it upstream. Follow-up PRs with example sources and dest will follow soon. IMPORTANT: all destinations should be released first as we decided new sources will work only with new destination to avoid un-necessary backward compatibility maintenance. Example PRs: - PostgreSQL: cloudquery/cloudquery#10783 - GCP: cloudquery/cloudquery#10784 - CLI: cloudquery/cloudquery#10785
363aad2 to
7d07366
Compare
Contributor
hermanschaaf
left a comment
There was a problem hiding this comment.
Looks good! Few final comments about uint handling
Co-authored-by: Herman Schaaf <hermanschaaf@gmail.com>
candiduslynx
suggested changes
May 17, 2023
| b.Append(val.([]byte)) | ||
| case *array.TimestampBuilder: | ||
| b.Append(arrow.Timestamp(val.(time.Time).UnixMicro())) | ||
| switch b.Type().(*arrow.TimestampType).Unit { |
Contributor
There was a problem hiding this comment.
same as in snowflake PR (use single func instead of own impl)
Co-authored-by: Alex Shcherbakov <candiduslynx@users.noreply.github.com>
candiduslynx
suggested changes
May 17, 2023
kodiakhq bot
pushed a commit
that referenced
this pull request
May 18, 2023
🤖 I have created a release *beep* *boop* --- ## [4.1.0](plugins-destination-postgresql-v4.0.5...plugins-destination-postgresql-v4.1.0) (2023-05-18) ### Features * **deps:** Upgrade to Apache Arrow v13 (latest `cqmain`) ([#10605](#10605)) ([a55da3d](a55da3d)) * **postgresql:** Update PG to SDK V3 native arrow support ([#10783](#10783)) ([d242030](d242030)) ### Bug Fixes * **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.0.8 ([#10798](#10798)) ([27ff430](27ff430)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Closes #10727