Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/go/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Go 具有多个输入的ParDo函数_Go_Sdk_Apache Beam - Fatal编程技术网

Go 具有多个输入的ParDo函数

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

我想使用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.Option in argument to beam.ParDo

我的问题是,如果可能的话,我们如何向ParDo函数发出多个输入呢?
谢谢。

您可以使用侧面输入来提供额外的PCollection作为输入。看


还有一个类似的问题,其中包含更多示例代码。

您的问题是什么?该问题已编辑