Go 具有多个输入的ParDo函数
我想使用Apache Beam的Go SDK,我正在尝试创建一个计算两个向量的点积的管道Go 具有多个输入的ParDo函数,go,sdk,apache-beam,Go,Sdk,Apache Beam,我想使用Apache Beam的Go SDK,我正在尝试创建一个计算两个向量的点积的管道 Computesit(a, b []int)int { return a.Dot(b) } A:= beam.Create(s, []int{1,2}) B:= beam.Create(s, []int{3,4}) Dot := beam.ParDo(s,Computesit, A, B) 但是我得到了以下错误 Cannot use B (type.PCollection) as type beam.O
Computesit(a, b []int)int {
return a.Dot(b)
}
A:= beam.Create(s, []int{1,2})
B:= beam.Create(s, []int{3,4})
Dot := beam.ParDo(s,Computesit, A, B)
但是我得到了以下错误
Cannot use B (type.PCollection) as type beam.Option in argument to beam.ParDo
我的问题是,如果可能的话,我们如何向ParDo函数发出多个输入呢?
谢谢。您可以使用侧面输入来提供额外的PCollection作为输入。看
还有一个类似的问题,其中包含更多示例代码。您的问题是什么?该问题已编辑