-
Notifications
You must be signed in to change notification settings - Fork 25
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>
methodsThere 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.IPNet
as a reference.Type
implementations: we do return a pointer fromNewXYZType
function, so it's only natural to define the receiver as pointer as well.Inet
InetBuilder
*net.IPNet
(pointer) inAppend
,UnsafeAppend
&AppendValues
AppendValues
now accounts forvalid
paramInetArray
String
method uses%q
format as mainstream Apache Arrow typesValue(i int) *net.IPNet
functionGetOneForMarshal
utilizesValue
implementationJSON
JSONBuilder
json.DisableHTMLEscape()
option per Destination plugins receive escaped data #622AppendValues
now accounts forvalid
paramUnmarshalJSON
implementation is streamlined with helperUnmarshal(dec *json.Decoder) error
function (as mainstream Apache Arrow types)JSONArray
String
method uses%q
format as mainstream Apache Arrow typesValue(i int) any
function that will unmarshal the stored data & return the concrete typejson.UnmarshalNoEscape
per Destination plugins receive escaped data #622GetOneForMarshal
now doesn't perform unmarshaling and, instead, returns the storedjson.RawMessage
Mac
MacBuilder
AppendValues
now accounts forvalid
paramMacArray
String
method uses%q
format as mainstream Apache Arrow typesValue(i int) net.HardwareAddr
functionUUID
UUIDBuilder
AppendValues
now accounts forvalid
paramuuid.Must
func instead of panic in codeUUIDArray
String
method uses%q
format as mainstream Apache Arrow typesValue(i int) uuid.UUID
funcuuid.Must
func instead of panic in code