-
Notifications
You must be signed in to change notification settings - Fork 24
feat(arrow): Streamline Apache Arrow extension types #823
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
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. |
Value(int) <type> methods
yevgenypats
left a 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.
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
🤖 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).
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