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:29:05 UTC

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

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



##########
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:
       I don't love this little hack, it will need a more substantial re-write to support non-string keys. For now this establishes the function signature to be correct; however, it will have to get tweaked once I get the end-to-end code change completed.




-- 
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