[ 
https://issues.apache.org/jira/browse/BEAM-5097?focusedWorklogId=644177&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-644177
 ]

ASF GitHub Bot logged work on BEAM-5097:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 31/Aug/21 14:55
            Start Date: 31/Aug/21 14:55
    Worklog Time Spent: 10m 
      Work Description: lostluck commented on a change in pull request #15399:
URL: https://github.com/apache/beam/pull/15399#discussion_r698606271



##########
File path: sdks/go/examples/cookbook/combine/combine.go
##########
@@ -67,11 +68,13 @@ type extractFn struct {
        MinLength int `json:"min_length"`
 }
 
-func (f *extractFn) ProcessElement(row WordRow, emit func(string, string)) {
+func (f *extractFn) ProcessElement(ctx context.Context, row WordRow, emit 
func(string, string)) {
+

Review comment:
       nit: rm spare line

##########
File path: sdks/go/examples/wordcount/wordcount.go
##########
@@ -111,9 +111,11 @@ func init() {
 }
 
 var (
-       wordRE  = regexp.MustCompile(`[a-zA-Z]+('[a-z])?`)
-       empty   = beam.NewCounter("extract", "emptyLines")
-       lineLen = beam.NewDistribution("extract", "lineLenDistro")
+       wordRE      = regexp.MustCompile(`[a-zA-Z]+('[a-z])?`)
+       empty       = beam.NewCounter("extract", "emptyLines")
+       minLength   = flag.Int("min_length", 9, "Minimum word length")

Review comment:
       Since this is a new flag, and this example doesn't filter words, we 
might want to just call it "small_word_length" instead, and clarify that it 
determines what gets counted.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 644177)
    Time Spent: 2h 40m  (was: 2.5h)

> Increment counter for "small words" in go SDK example
> -----------------------------------------------------
>
>                 Key: BEAM-5097
>                 URL: https://issues.apache.org/jira/browse/BEAM-5097
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-go
>            Reporter: Holden Karau
>            Assignee: Ritesh Ghorse
>            Priority: P4
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Increment counter for "small words" in go SDK example



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to