Skip to content

fix: TransformWithStruct/DefaultNameTransformer change for invalid column names #820

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

Merged
merged 1 commit into from
Apr 26, 2023
Merged

fix: TransformWithStruct/DefaultNameTransformer change for invalid column names #820

merged 1 commit into from
Apr 26, 2023

Conversation

disq
Copy link
Member

@disq disq commented Apr 24, 2023

Closes cloudquery/cloudquery#10274

I went for the simple approach of not accepting the json tag value if it's going to result in an invalid column name.

@disq disq requested a review from yevgenypats as a code owner April 24, 2023 12:53
@github-actions github-actions bot added the fix label Apr 24, 2023
Copy link
Member

@erezrokah erezrokah left a comment

Choose a reason for hiding this comment

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

Nice, makes sense

@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Patch coverage: 50.00% and no project coverage change.

Comparison is base (e9f29ff) 47.04% compared to head (53feedc) 47.05%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #820   +/-   ##
=======================================
  Coverage   47.04%   47.05%           
=======================================
  Files          76       76           
  Lines        7858     7861    +3     
=======================================
+ Hits         3697     3699    +2     
- Misses       3670     3671    +1     
  Partials      491      491           
Impacted Files Coverage Δ
schema/table.go 42.97% <0.00%> (-0.18%) ⬇️
transformers/struct.go 71.90% <100.00%> (+0.23%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

⏱️ Benchmark results

Comparing with e9f29ff

  • DefaultConcurrencyDFS-2 resources/s: 11,028 ⬇️ 0.15% decrease vs. e9f29ff
  • DefaultConcurrencyRoundRobin-2 resources/s: 12,421 ⬆️ 2.65% increase vs. e9f29ff
  • Glob-2 ns/op: 164.1 ⬇️ 21.45% decrease vs. e9f29ff
  • TablesWithChildrenDFS-2 resources/s: 30,408 ⬆️ 10.91% increase vs. e9f29ff
  • TablesWithChildrenRoundRobin-2 resources/s: 29,291 ⬆️ 10.24% increase vs. e9f29ff
  • TablesWithRateLimitingDFS-2 resources/s: 28.51 ⬆️ 0.11% increase vs. e9f29ff
  • TablesWithRateLimitingRoundRobin-2 resources/s: 853.4 ⬆️ 8.26% increase vs. e9f29ff
  • BufferedScanner-2 ns/op: 9.284 ⬇️ 1.04% decrease vs. e9f29ff
  • LogReader-2 ns/op: 30.49 ⬇️ 1.18% decrease vs. e9f29ff

@disq disq added the automerge label Apr 25, 2023
@kodiakhq kodiakhq bot merged commit 01e6649 into cloudquery:main Apr 26, 2023
@disq disq deleted the fix/transformwithstruct branch April 26, 2023 12:43
candiduslynx pushed a commit that referenced this pull request Apr 28, 2023
🤖 I have created a release *beep* *boop*
---


##
[2.5.0](v2.4.0...v2.5.0)
(2023-04-28)


### Features

* Add table description to Arrow schema metadata
([#824](#824))
([1a8072f](1a8072f))
* **arrow:** Streamline Apache Arrow extension types
([#823](#823))
([f32fac3](f32fac3))
* **test:** Add double migration test
([#827](#827))
([4cd3872](4cd3872))
* Time values are truncated uniformly
([#825](#825))
([ffb97b0](ffb97b0))


### Bug Fixes

* TransformWithStruct/DefaultNameTransformer change for invalid column
names ([#820](#820))
([01e6649](01e6649))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
candiduslynx added a commit that referenced this pull request Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Panic with transformers.TransformWithStruct() on non compliant column names.
4 participants