Skip to content

ARROW-17500: [Go] Kernel and KernelContext interfaces - #13946

Merged
zeroshade merged 5 commits into
apache:masterfrom
zeroshade:arrow-17500-kernels
Aug 24, 2022
Merged

zeroshade merged 5 commits into
apache:masterfrom
zeroshade:arrow-17500-kernels

Conversation

@zeroshade

Copy link
Copy Markdown
Member

This implements the interface for Kernels along with a KernelSignature struct and the type matching for InputType and OutputType via a TypeMatcher interface. Along with tests for all of the above.

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

@pitrou pitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you plan to add any docstrings here?

@zeroshade

Copy link
Copy Markdown
Member Author

@pitrou I probably should despite these all being internal and not public, so the documentation is clear for implementing kernels.

I'll go do that

@zeroshade

Copy link
Copy Markdown
Member Author

@pitrou I've added the Godoc comments for the types and functions here.

@pitrou

pitrou commented Aug 23, 2022

Copy link
Copy Markdown
Member

Is there a Go developer that can give this a review @zeroshade ?

@zeroshade

Copy link
Copy Markdown
Member Author

@cyb70289 is really the only one I know who regularly comments (which is why i requested a review from him)

Unfortunately there really isn't any other regular Go developers contributing currently 😞

Comment thread go/arrow/compute/internal/kernel.go Resolved
Comment thread go/arrow/compute/internal/kernel.go Resolved
Comment thread go/arrow/compute/internal/kernel.go Resolved
Comment thread go/arrow/compute/internal/kernel.go Resolved
Comment thread go/arrow/compute/internal/kernel.go Resolved
@zeroshade

Copy link
Copy Markdown
Member Author

I'll wait until tomorrow to merge this in order to give @cyb70289 time to comment if desired.

@cyb70289 cyb70289 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread go/arrow/compute/internal/kernel.go Outdated
}

func (s sameTypeIDMatcher) Matches(typ arrow.DataType) bool { return s.accepted == typ.ID() }
func (s *sameTypeIDMatcher) Equals(other TypeMatcher) bool {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: a bit dogmatic but is it possible to make this method also accepts value, not pointer?

From https://go.dev/doc/faq#methods_on_values_or_pointers, looks it's recommended to use value or pointer receiver consistently.

Next is consistency. If some of the methods of the type must have pointer receivers, the rest should too, so the method set is consistent regardless of how the type is used. See the section on method sets for details.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll modify it for that

@zeroshade
zeroshade merged commit 28b81ec into apache:master Aug 24, 2022
@zeroshade
zeroshade deleted the arrow-17500-kernels branch August 24, 2022 14:20
zeroshade added a commit to zeroshade/arrow that referenced this pull request Aug 24, 2022
This implements the interface for Kernels along with a `KernelSignature` struct and the type matching for `InputType` and `OutputType` via a `TypeMatcher` interface. Along with tests for all of the above.

Authored-by: Matt Topol <[email protected]>
Signed-off-by: Matt Topol <[email protected]>
@ursabot

ursabot commented Aug 24, 2022

Copy link
Copy Markdown

Benchmark runs are scheduled for baseline = 712e06b and contender = 28b81ec. 28b81ec is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.0% ⬆️0.0%] test-mac-arm
[Failed ⬇️0.55% ⬆️0.0%] ursa-i9-9960x
[Failed ⬇️0.0% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 28b81ec1 ec2-t3-xlarge-us-east-2
[Failed] 28b81ec1 test-mac-arm
[Failed] 28b81ec1 ursa-i9-9960x
[Failed] 28b81ec1 ursa-thinkcentre-m75q
[Finished] 712e06bc ec2-t3-xlarge-us-east-2
[Failed] 712e06bc test-mac-arm
[Failed] 712e06bc ursa-i9-9960x
[Failed] 712e06bc ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

zeroshade added a commit to zeroshade/arrow that referenced this pull request Aug 25, 2022
This implements the interface for Kernels along with a `KernelSignature` struct and the type matching for `InputType` and `OutputType` via a `TypeMatcher` interface. Along with tests for all of the above.

Authored-by: Matt Topol <[email protected]>
Signed-off-by: Matt Topol <[email protected]>
zeroshade added a commit to zeroshade/arrow that referenced this pull request Aug 29, 2022
This implements the interface for Kernels along with a `KernelSignature` struct and the type matching for `InputType` and `OutputType` via a `TypeMatcher` interface. Along with tests for all of the above.

Authored-by: Matt Topol <[email protected]>
Signed-off-by: Matt Topol <[email protected]>
zeroshade added a commit to zeroshade/arrow that referenced this pull request Aug 29, 2022
This implements the interface for Kernels along with a `KernelSignature` struct and the type matching for `InputType` and `OutputType` via a `TypeMatcher` interface. Along with tests for all of the above.

Authored-by: Matt Topol <[email protected]>
Signed-off-by: Matt Topol <[email protected]>
zagto pushed a commit to zagto/arrow that referenced this pull request Oct 7, 2022
This implements the interface for Kernels along with a `KernelSignature` struct and the type matching for `InputType` and `OutputType` via a `TypeMatcher` interface. Along with tests for all of the above.

Authored-by: Matt Topol <[email protected]>
Signed-off-by: Matt Topol <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants