You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "lostluck (via GitHub)" <gi...@apache.org> on 2023/02/18 17:41:28 UTC

[GitHub] [beam] lostluck commented on a diff in pull request #25535: [Go SDK]: Retrieve file size in CreateInitialRestriction in textio.Read

lostluck commented on code in PR #25535:
URL: https://github.com/apache/beam/pull/25535#discussion_r1111064946


##########
sdks/go/pkg/beam/io/textio/textio.go:
##########
@@ -108,36 +106,30 @@ func expandFn(ctx context.Context, glob string, emit func(string)) error {
 	return nil
 }
 
-// sizeFn pairs a filename with the size of that file in bytes.
-// TODO(https://github.com/apache/beam/issues/20607): Once CreateInitialRestriction supports Context params and
-// error return values, this can be done in readSdfFn.CreateInitialRestriction.
-func sizeFn(ctx context.Context, filename string) (string, int64, error) {
+// readFn reads individual lines from a text file, given a filename and a
+// size in bytes for that file. Implemented as an SDF to allow splitting

Review Comment:
   Technically it no longer relies on an input size in bytes. We can to remove that part of the comment now.



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