-
Notifications
You must be signed in to change notification settings - Fork 547
feat(snowflake): Migrate to SDK V3 native arrow #10822
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
| make test | ||
| ``` | ||
|
|
||
| https://REMBAZX.ZO72963.europe-west4.gcp.snowflakecomputing.com:443/session/v1/login-request?databaseName=testdb&requestId=e8d15dca-cd82-4995-77a1-c0dffc4f1a68&request_guid=36aac0a0-0221-4bd4-7108-fb0227f17bcc&schemaName=public&warehouse=test |
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.
Are we sure about this
5862d89 to
08ac076
Compare
| u, err := strconv.ParseInt(val.(string), 10, 8) | ||
| if err != nil { | ||
| return err | ||
| return fmt.Errorf("failed to parse int8: %w", err) |
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'd just go with AppendValueFromString everywhere
| b.Append(val.([]uint8)) | ||
| case *array.TimestampBuilder: | ||
| b.Append(arrow.Timestamp(val.(time.Time).UnixMicro())) | ||
| var timeVal time.Time |
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.
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.
not sure I understand this comment.
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.
Instead of parsing manually you could use arrow.TimestampFromString(val.(string), b.Type().(*arrow.TimestampType).Unit
| default: | ||
| return fmt.Errorf("unsupported timestamp unit %s", f.Type.(*arrow.TimestampType).Unit) | ||
| } | ||
| case array.ListLikeBuilder: |
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 use from string
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.
Im not sure how from string will work here given it's time.Time
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.
basically we need to add to arrow AppendTime but for now not to block it we can just use this.
Co-authored-by: Alex Shcherbakov <[email protected]>
Co-authored-by: Alex Shcherbakov <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [2.1.0](plugins-destination-snowflake-v2.0.3...plugins-destination-snowflake-v2.1.0) (2023-05-18) ### Features * **deps:** Upgrade to Apache Arrow v13 (latest `cqmain`) ([#10605](#10605)) ([a55da3d](a55da3d)) * **snowflake:** Migrate to SDK V3 native arrow ([#10822](#10822)) ([9b5dfe0](9b5dfe0)) ### Bug Fixes * **deps:** Update module github.com/aws/aws-sdk-go-v2/credentials to v1.13.24 ([#10787](#10787)) ([2056241](2056241)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/feature/s3/manager to v1.11.67 ([#10788](#10788)) ([fd660b2](fd660b2)) * **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).
Closes #10729