lostluck commented on PR #23890: URL: https://github.com/apache/beam/pull/23890#issuecomment-1295995839
Ah, I'm neglecting to strip the pointer from the type. Turns out "derived" types like pointers and slices "don't exist" with how this registry was built. Easy enough to fix (and test). Thanks for catching it! On Sat, Oct 29, 2022, 8:41 AM Robert Burke ***@***.***> wrote: > That's very strange. That's what the additional registrations in this PR > should be handling. > > That error means it didn't have the type registered and had to > synthetically generate it. In simple cases this satisfies Go's > Assignability rules but not so kuch for nested structs. > > Is there more of a panic trace where that error comes from? > > > On Sat, Oct 29, 2022, 8:06 AM capthiron ***@***.***> wrote: > >> ***@***.**** commented on this pull request. >> ------------------------------ >> >> In sdks/go/pkg/beam/register/iter.go >> <https://github.com/apache/beam/pull/23890#discussion_r1008714460>: >> >> > @@ -113,7 +123,9 @@ func Iter1[T any]() { >> registerFunc := func(s exec.ReStream) exec.ReusableInput { >> return &iter1[T]{s: s} >> } >> - exec.RegisterInput(reflect.TypeOf(i).Elem(), registerFunc) >> + itT := reflect.TypeOf(i).Elem() >> >> Hey @lostluck <https://github.com/lostluck> >> I just started a test run with your changes applied with the bigtable io >> connector (#23411 <https://github.com/apache/beam/pull/23411>). >> Unfortunately I still ran into the following error: reflect.Set: value >> of type struct { RowKey string; Ops []struct { Family string; Column >> string; Ts int64; Value []uint8 }; GroupKey string } is not assignable to >> type bigtableio.Mutation. >> I played around with this implementation but wasn't able to make it work. >> My knowledge on the reflect package is somehow limited though. >> >> — >> Reply to this email directly, view it on GitHub >> <https://github.com/apache/beam/pull/23890#pullrequestreview-1161000888>, >> or unsubscribe >> <https://github.com/notifications/unsubscribe-auth/ADKDOFPTGUI2RX7BWCNGSODWFU4QLANCNFSM6AAAAAARROGTG4> >> . >> You are receiving this because you were mentioned.Message ID: >> ***@***.***> >> > -- 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]
