-
Notifications
You must be signed in to change notification settings - Fork 530
feat(clickhouse)!: Upgrade to github.com/cloudquery/plugin-sdk/v2
#10284
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
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.
Just marking so I've a chance to review before it is merged.
@yevgenypats @erezrokah I added the boilerplate reference in 7f057c0 |
ceb1600
to
7f057c0
Compare
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.
lot's of code :) few initial comments - will take a break and then give it another fresh look tomorrow.
I did an initial research and seems this should be our best bet in clickhouse indeed in terms of transformation (transforming to json or to arrow will be too slow and we might loose some control that we need)
Done in ded410e. |
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.
I think let's try go easy on generics. maybe we should disable generics use across all our repos.
I don't see an immediate need for generics in this PR. For example all generics code under values
can be replaces with one call to .Values
available on all arrow arrays (or .Uint16Values
for some reason it is called by different name sometimes but nevertheless it is available there so should save lots of code and test code in this PR which will make it hard to maintain)
@yevgenypats are you referring to the If we take a look at the Could you give an example on what do you suggest doing and where? |
fd1471a
to
7e11de6
Compare
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.
Going to stamp approve it. Might go back to that if time allows.
… `array.XBuilder.AppendValueFromString` (#35457) ### Rationale for this change I noticed that some values produced by `array.X.ValueStr` can't be parsed back by `array.XBuilder.AppendValueFromString` while debugging cloudquery/cloudquery#10284. Additionally, some arrays didn't implement the corresponding functions at all. ### What changes are included in this PR? * Ensure interface contract * Use `array.NullValueStr` constant * Fix bugs found along the way * Synced `internal/types/UUID` with CQ implementation to account for `valid` param ### Are these changes tested? This code was developed in TDD mode. The changes workflow was: 1. Introduce `XStringRoundTrip` tests to test that the resulting array will be equal in the Arrow sense (using [`array.Equal`](https://pkg.go.dev/github.com/apache/arrow/go/v12/arrow/array#Equal)) 2. Fix any discrepancies ### Are there any user-facing changes? Some fixes to the accepted values & parse logic to correspond to the interface contract. * Closes: #35421 Authored-by: candiduslynx <[email protected]> Signed-off-by: Matt Topol <[email protected]>
22e25fc
to
1ca365b
Compare
This reverts commit 45d004a.
5b93dfa
to
2a01f2f
Compare
2a01f2f
to
2af78f2
Compare
🤖 I have created a release *beep* *boop* --- ## [3.0.0](plugins-destination-clickhouse-v2.0.1...plugins-destination-clickhouse-v3.0.0) (2023-05-09) ### ⚠ BREAKING CHANGES * This change enables [`allow_nullable_key`](https://clickhouse.com/docs/en/operations/settings/settings#allow-nullable-key) for tables ([#10284](#10284)). ### Features * Allow nullable columns in primary keys ([#10284](#10284)) ([26e7d0e](26e7d0e)) * **deps:** Upgrade to Apache Arrow v13 (latest `cqmain`) ([#10605](#10605)) ([a55da3d](a55da3d)) * Update to use [Apache Arrow](https://arrow.apache.org/) type system ([#10284](#10284)) ([26e7d0e](26e7d0e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…Str` & `array.XBuilder.AppendValueFromString` (apache#35457) ### Rationale for this change I noticed that some values produced by `array.X.ValueStr` can't be parsed back by `array.XBuilder.AppendValueFromString` while debugging cloudquery/cloudquery#10284. Additionally, some arrays didn't implement the corresponding functions at all. ### What changes are included in this PR? * Ensure interface contract * Use `array.NullValueStr` constant * Fix bugs found along the way * Synced `internal/types/UUID` with CQ implementation to account for `valid` param ### Are these changes tested? This code was developed in TDD mode. The changes workflow was: 1. Introduce `XStringRoundTrip` tests to test that the resulting array will be equal in the Arrow sense (using [`array.Equal`](https://pkg.go.dev/github.com/apache/arrow/go/v12/arrow/array#Equal)) 2. Fix any discrepancies ### Are there any user-facing changes? Some fixes to the accepted values & parse logic to correspond to the interface contract. * Closes: apache#35421 Authored-by: candiduslynx <[email protected]> Signed-off-by: Matt Topol <[email protected]>
…Str` & `array.XBuilder.AppendValueFromString` (apache#35457) ### Rationale for this change I noticed that some values produced by `array.X.ValueStr` can't be parsed back by `array.XBuilder.AppendValueFromString` while debugging cloudquery/cloudquery#10284. Additionally, some arrays didn't implement the corresponding functions at all. ### What changes are included in this PR? * Ensure interface contract * Use `array.NullValueStr` constant * Fix bugs found along the way * Synced `internal/types/UUID` with CQ implementation to account for `valid` param ### Are these changes tested? This code was developed in TDD mode. The changes workflow was: 1. Introduce `XStringRoundTrip` tests to test that the resulting array will be equal in the Arrow sense (using [`array.Equal`](https://pkg.go.dev/github.com/apache/arrow/go/v12/arrow/array#Equal)) 2. Fix any discrepancies ### Are there any user-facing changes? Some fixes to the accepted values & parse logic to correspond to the interface contract. * Closes: apache#35421 Authored-by: candiduslynx <[email protected]> Signed-off-by: Matt Topol <[email protected]>
…Str` & `array.XBuilder.AppendValueFromString` (apache#35457) ### Rationale for this change I noticed that some values produced by `array.X.ValueStr` can't be parsed back by `array.XBuilder.AppendValueFromString` while debugging cloudquery/cloudquery#10284. Additionally, some arrays didn't implement the corresponding functions at all. ### What changes are included in this PR? * Ensure interface contract * Use `array.NullValueStr` constant * Fix bugs found along the way * Synced `internal/types/UUID` with CQ implementation to account for `valid` param ### Are these changes tested? This code was developed in TDD mode. The changes workflow was: 1. Introduce `XStringRoundTrip` tests to test that the resulting array will be equal in the Arrow sense (using [`array.Equal`](https://pkg.go.dev/github.com/apache/arrow/go/v12/arrow/array#Equal)) 2. Fix any discrepancies ### Are there any user-facing changes? Some fixes to the accepted values & parse logic to correspond to the interface contract. * Closes: apache#35421 Authored-by: candiduslynx <[email protected]> Signed-off-by: Matt Topol <[email protected]>
… `array.XBuilder.AppendValueFromString` (#35457) ### Rationale for this change I noticed that some values produced by `array.X.ValueStr` can't be parsed back by `array.XBuilder.AppendValueFromString` while debugging cloudquery/cloudquery#10284. Additionally, some arrays didn't implement the corresponding functions at all. ### What changes are included in this PR? * Ensure interface contract * Use `array.NullValueStr` constant * Fix bugs found along the way * Synced `internal/types/UUID` with CQ implementation to account for `valid` param ### Are these changes tested? This code was developed in TDD mode. The changes workflow was: 1. Introduce `XStringRoundTrip` tests to test that the resulting array will be equal in the Arrow sense (using [`array.Equal`](https://pkg.go.dev/github.com/apache/arrow/go/v12/arrow/array#Equal)) 2. Fix any discrepancies ### Are there any user-facing changes? Some fixes to the accepted values & parse logic to correspond to the interface contract. * Closes: #35421 Authored-by: candiduslynx <[email protected]> Signed-off-by: Matt Topol <[email protected]>
Closes #9847
BEGIN_COMMIT_OVERRIDE
feat: Update to use Apache Arrow type system (#10284)
BREAKING-CHANGE: This release introduces an internal change to our type system to use Apache Arrow. This should not have any visible breaking changes, however due to the size of the change we are introducing it under a major version bump to communicate that it might have some bugs that we weren't able to catch during our internal tests. If you encounter an issue during the upgrade, please submit a bug report.
feat: Allow nullable columns in primary keys (#10284)
BREAKING-CHANGE: This change enables
allow_nullable_key
for tables (#10284).END_COMMIT_OVERRIDE