-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-20415: [Go] Kernel Input Type for RLE #14146
Conversation
zeroshade
commented
Sep 15, 2022
•
edited by github-actions
bot
Loading
edited by github-actions
bot
- Closes: [Go] Kernel Input Type Matcher for RLE #20415
CC @zagto |
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.
Looks fairly straightforward, though I don't truly understand go
@@ -42,7 +43,12 @@ func Concatenate(arrs []arrow.Array, mem memory.Allocator) (result arrow.Array, | |||
|
|||
defer func() { | |||
if pErr := recover(); pErr != nil { | |||
err = fmt.Errorf("arrow/concat: unknown error: %v", pErr) | |||
switch e := pErr.(type) { | |||
case error: |
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.
I don't really know go but why is it important to distinguish between these two error types? Adding unknown error
doesn't seem to contribute too much to a user's understanding of the error.
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.
using %w
wraps the error that was panic'd so that someone receiving the error can use errors.Is
or errors.As
if they desire to react differently based on the type of the error (such as arrow.ErrInvalid
vs arrow.ErrIndex
vs arrow.ErrNotImplemented
etc...) basically it creates an error chain
In the case of the "unknown error"
it means that we had a panic with a string rather than a proper error instance. Though I agree that the text "unknown error" doesn't contribute much to a user's understanding here, so i'll just get rid of that.
7bbac16
to
f26c1aa
Compare
563faca
to
f38109e
Compare
I'll merge this at EOD if no one has any objections/comments |
|
Benchmark runs are scheduled for baseline = d422137 and contender = 27cea43. 27cea43 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Authored-by: Matt Topol <zotthewizard@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
Authored-by: Matt Topol <zotthewizard@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>