feat(arrow): Streamline Apache Arrow extension types#823
Merged
candiduslynx merged 25 commits intomainfrom Apr 27, 2023
Merged
Conversation
d43f3a6 to
6b0ea1d
Compare
⏱️ Benchmark resultsComparing with 1a8072f
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #823 +/- ##
==========================================
+ Coverage 46.98% 47.19% +0.20%
==========================================
Files 76 76
Lines 7872 7844 -28
==========================================
+ Hits 3699 3702 +3
+ Misses 3682 3642 -40
- Partials 491 500 +9
☔ View full report in Codecov by Sentry. |
candiduslynx
commented
Apr 25, 2023
candiduslynx
commented
Apr 25, 2023
candiduslynx
commented
Apr 25, 2023
Value(int) <type> methods
hermanschaaf
approved these changes
Apr 27, 2023
yevgenypats
suggested changes
Apr 27, 2023
Contributor
yevgenypats
left a comment
There was a problem hiding this comment.
Im not sure I understand the reasoning or the value of using pointer receivers in some of the extensions instead of regular params? Were there any performance issue? we turn them into string anyway and by using pointers we just introduce more risk of the data being changed inside while we don't really want that to happen so I can't see the value unless Im missing something.
This reverts commit b1fdb23.
77efac2 to
af39af0
Compare
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Common
Use pointer receivers:
String()method receiver is natural, seenet.IPNetas a reference.Typeimplementations: we do return a pointer fromNewXYZTypefunction, so it's only natural to define the receiver as pointer as well.InetInetBuilder*net.IPNet(pointer) inAppend,UnsafeAppend&AppendValuesAppendValuesnow accounts forvalidparamInetArrayStringmethod uses%qformat as mainstream Apache Arrow typesValue(i int) *net.IPNetfunctionGetOneForMarshalutilizesValueimplementationJSONJSONBuilderjson.DisableHTMLEscape()option per Destination plugins receive escaped data #622AppendValuesnow accounts forvalidparamUnmarshalJSONimplementation is streamlined with helperUnmarshal(dec *json.Decoder) errorfunction (as mainstream Apache Arrow types)JSONArrayStringmethod uses%qformat as mainstream Apache Arrow typesValue(i int) anyfunction that will unmarshal the stored data & return the concrete typejson.UnmarshalNoEscapeper Destination plugins receive escaped data #622GetOneForMarshalnow doesn't perform unmarshaling and, instead, returns the storedjson.RawMessageMacMacBuilderAppendValuesnow accounts forvalidparamMacArrayStringmethod uses%qformat as mainstream Apache Arrow typesValue(i int) net.HardwareAddrfunctionUUIDUUIDBuilderAppendValuesnow accounts forvalidparamuuid.Mustfunc instead of panic in codeUUIDArrayStringmethod uses%qformat as mainstream Apache Arrow typesValue(i int) uuid.UUIDfuncuuid.Mustfunc instead of panic in code