apache / apache/beam

Improve beam package GoDoc with examples.

Open
#20,341 1 comment 0 reactions 0 assignees View on GitHub
go improvement P3
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

The  [beam package godoc](https://godoc.org/github.com/apache/beam/sdks/go/pkg/beam?utm_source=backtogodoc) needs some improvements.
@lostluck wrote some for internal use at Google, but it hasn't yet migrated out.
Even without these, godoc provides a few nice functions like [compileable examples](https://blog.golang.org/examples) and [more](https://pkg.go.dev/github.com/fluhus/godoc-tricks?tab=doc) of which we have made light use.

Given the complexity of the API, we could use more.

In particular, calling out the Bundle Lifecycle method names for Structural DoFns, and the method names for Structural CombineFns would be of immense value, as that's not clearly documented.

Also, examples of how to use GroupByKey and CoGroupByKey and what that means for the subsequent DoFn methods, and how they affect Side Inputs.

As examples are run during tests, this will also improve testing of various edge cases, to be part of the package.

The main complication is that these will require _example.go files since methods cannot be added to types in function scopes.

Imported from Jira [BEAM-10253](https://issues.apache.org/jira/browse/BEAM-10253). Original Jira may contain additional context.
Reported by: lostluck.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.