[ 
https://issues.apache.org/jira/browse/BEAM-5421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16619531#comment-16619531
 ] 

Vadym commented on BEAM-5421:
-----------------------------

Thanks a mil for the explanation!

I have allowed myself to draft the tests that I wish were passing: 
[https://github.com/apache/beam/pull/6429/files. 
|https://github.com/apache/beam/pull/6429/files]It may be of a help to further 
tackle the issue.

Also, I was wondering about the best approach you have mentioned (BEAM-3580). I 
would love to help but I am afraid I lack a full understanding of the task. If 
you could draft the suggested path forward I'd be happy to try implementing it.

Cheers!

> filter.Exclude is panicking
> ---------------------------
>
>                 Key: BEAM-5421
>                 URL: https://issues.apache.org/jira/browse/BEAM-5421
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-go
>    Affects Versions: 2.6.0
>         Environment: Mac, Linux
>            Reporter: Vadym
>            Priority: Major
>
> {code:java}
> package main
> import (
>     "context"
>     "github.com/apache/beam/sdks/go/pkg/beam"
>     "github.com/apache/beam/sdks/go/pkg/beam/io/textio"
>     "github.com/apache/beam/sdks/go/pkg/beam/log"
>     "github.com/apache/beam/sdks/go/pkg/beam/transforms/filter"
>     "github.com/apache/beam/sdks/go/pkg/beam/x/beamx"
> )
> func islongWord(s string) bool {
>   return len(s) < 3
> }
> func main() {
>     beam.Init()
>     ctx := context.Background()
>     p, s := beam.NewPipelineWithRoot()
>     words := beam.Create(s, "a", "b", "long", "alsolong")
>     long := filter.Exclude(s, words, islongWord)
>     textio.Write(s, "long.txt", long)
>     if err := beamx.Run(ctx, p); err != nil {
>         log.Exitf(ctx, "Failed to execute job: %v", err)
>     }
> }
> {code}
> The code above fails with the error message:
> {{2018/09/18 15:47:23 Failed to execute job: panic: reflect: Call using 
> []uint8 as type string goroutine 1 [running]:}}
>  
> The code was taken from Exclude example in the documentation: 
> https://godoc.org/github.com/apache/beam/sdks/go/pkg/beam/transforms/filter#Exclude



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to