Skip to content

Conversation

@erezrokah
Copy link
Member

Summary

Follow up to cloudquery/plugin-sdk#810

@erezrokah erezrokah requested review from a team and hermanschaaf and removed request for a team April 20, 2023 08:05
@cq-bot cq-bot added the mysql label Apr 20, 2023
}

func reverseTransform(table *arrow.Schema, values []any) (arrow.Record, error) {
recordBuilder := array.NewRecordBuilder(memory.DefaultAllocator, table)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default allocator is the Go one, so I don't think we need a release here

@erezrokah erezrokah changed the title fix: Update to SDK v2.3.7, remove release call fix: Update to SDK v2.3.7, remove release calls Apr 20, 2023
@erezrokah erezrokah added the automerge Automatically merge once required checks pass label Apr 20, 2023

func reverseTransform(table *arrow.Schema, values []any) (arrow.Record, error) {
recordBuilder := array.NewRecordBuilder(memory.DefaultAllocator, table)
defer recordBuilder.Release()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here it's fine just because the builder is only used in this function scope. we can later try and test if it has any effect on memory vs not using it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default allocator is the Go one so I thought this is a no op. I can keep it if needed but removed to avoid confusion for someone who's later reading the code

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately Release is not a no-op in the Go allocator. But I think it's fine to remove it here and let the garbage collector clean it up for the sake of consistency.

Copy link
Member Author

@erezrokah erezrokah Apr 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good either way. I worried that using Release might leak into other places in the code if we use it here.
But I don't feel strongly about it.

I pushed a commit to add it back e5e1f6d

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted the commit until we reach a conclusion

@erezrokah erezrokah force-pushed the fix/remove_release_retain_mysql branch from e5e1f6d to 64589fe Compare April 20, 2023 10:26
@erezrokah erezrokah force-pushed the fix/remove_release_retain_mysql branch from 4e608a0 to 17c5a6c Compare April 20, 2023 10:28
@erezrokah erezrokah requested a review from yevgenypats April 20, 2023 10:33
@kodiakhq kodiakhq bot merged commit 5442837 into cloudquery:main Apr 20, 2023
kodiakhq bot pushed a commit that referenced this pull request Apr 20, 2023
🤖 I have created a release *beep* *boop*
---


## [2.0.0](plugins-destination-mysql-v1.0.5...plugins-destination-mysql-v2.0.0) (2023-04-20)


### ⚠ BREAKING CHANGES

* This release introduces an internal change to our type system to use [Apache Arrow](https://arrow.apache.org/). 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](https://github.com/cloudquery/cloudquery/issues/new/choose).
* Timestamp fields type changed from `datetime` to `datetime(6)` to avoid losing fractional data
* Mac Address and Inet column type changed from `nvarchar(255)` to `text` as we cannot assume `nvarchar(255)` columns represent valid Mac Address or Inet
* Float fields type changed from `float` to `double` for increased precision

### Features

* Float fields type changed from `float` to `double` for increased precision  ([c5d3508](c5d3508))
* Mac Address and Inet column type changed from `nvarchar(255)` to `text` as we cannot assume `nvarchar(255)` columns represent valid Mac Address or Inet  ([c5d3508](c5d3508))
* Timestamp fields type changed from `datetime` to `datetime(6)` to avoid losing fractional data ([c5d3508](c5d3508))
* Update to plugin SDK v2  ([c5d3508](c5d3508))
* Update to use [Apache Arrow](https://arrow.apache.org/) type system ([c5d3508](c5d3508))


### Bug Fixes

* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.45.0 ([#9863](#9863)) ([2799d62](2799d62))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v2 to v2.3.6 ([#10208](#10208)) ([91c80a7](91c80a7))
* Update to SDK v2.3.7, remove release calls ([#10209](#10209)) ([5442837](5442837))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants