You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/11/12 20:47:46 UTC

[GitHub] [beam] lostluck commented on a change in pull request #15966: [BEAM-3293] Add NewKeyedIterable function to SideInputAdapter interface

lostluck commented on a change in pull request #15966:
URL: https://github.com/apache/beam/pull/15966#discussion_r748576460



##########
File path: sdks/go/pkg/beam/core/runtime/exec/sideinput.go
##########
@@ -58,7 +59,16 @@ func NewSideInputAdapter(sid StreamID, sideInputID string, c *coder.Coder, wm Wi
 }
 
 func (s *sideInputAdapter) NewIterable(ctx context.Context, reader StateReader, w typex.Window) (ReStream, error) {
-	key, err := EncodeElement(s.kc, []byte(iterableSideInputKey))
+	return s.NewKeyedIterable(ctx, reader, w, iterableSideInputKey)
+}
+
+func (s *sideInputAdapter) NewKeyedIterable(ctx context.Context, reader StateReader, w typex.Window, iterKey interface{}) (ReStream, error) {
+	// TODO(jrmccluskey): re-write to ensure support for non-string keys

Review comment:
       What failure do you get without this? AFAICT, it should be plumbing the key coder for the SideInput's PCollection properly...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org