Skip to content

Use generics to generalize int32/int64/float32/float64 to number encoder/decoder/store - #83

Open
akrennmair wants to merge 12 commits into
masterfrom
ak-introduce-generics
Open

Use generics to generalize int32/int64/float32/float64 to number encoder/decoder/store#83
akrennmair wants to merge 12 commits into
masterfrom
ak-introduce-generics

Conversation

@akrennmair

Copy link
Copy Markdown
Member

This PR introduces Go 1.18 generics to generalize the separate int32/int64/float32/float64 implementation into a single number type with small specializations. This deduplicates a lot of similar code across these types.

Since this required a switch to Go 1.18, I also replaced interface{} with the new any type. I also migrated the existing fuzz tests for gofuzz with Go 1.18 fuzz tests.

And finally, I removed the vendor subdirectory as it caused issues and doesn't really make sense for a library.

@akrennmair

Copy link
Copy Markdown
Member Author

Looks like golangci-lint isn't quite mature enough to lint this code. Converting to draft for now...

@akrennmair
akrennmair marked this pull request as draft March 20, 2022 13:08
@codecov-commenter

codecov-commenter commented Mar 20, 2022

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 92.47059% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.27%. Comparing base (e6b70a8) to head (d41620e).
⚠️ Report is 26 commits behind head on master.

Files with missing lines Patch % Lines
cmd/parquet-tool/cmds/readfile.go 0.00% 5 Missing ⚠️
deltabp_decoder.go 76.19% 2 Missing and 3 partials ⚠️
type_number.go 92.59% 3 Missing and 1 partial ⚠️
deltabp_encoder.go 78.57% 2 Missing and 1 partial ⚠️
helpers.go 75.00% 1 Missing and 2 partials ⚠️
chunk_writer.go 90.00% 2 Missing ⚠️
floor/interfaces/marshaller.go 85.71% 2 Missing ⚠️
floor/interfaces/unmarshaller.go 75.00% 2 Missing ⚠️
schema.go 85.71% 1 Missing and 1 partial ⚠️
type_dict.go 77.77% 2 Missing ⚠️
... and 2 more
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #83      +/-   ##
==========================================
+ Coverage   86.73%   87.27%   +0.53%     
==========================================
  Files          48       46       -2     
  Lines        9777     9444     -333     
==========================================
- Hits         8480     8242     -238     
+ Misses        939      884      -55     
+ Partials      358      318      -40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@akrennmair
akrennmair marked this pull request as ready for review March 20, 2022 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants