MCPcopy Create free account
hub / github.com/baidu/bigflow / reduce

Function reduce

bigflow_python/python/bigflow/transforms.py:815–837  ·  view source on GitHub ↗

对于属于PCollection,使用给定的fn将所有元素规约为单个元素 假设输入类型为I,fn的期望签名为 fn(I1, I2) => I,即输出的类型必须与输入相同 (fn的第一个参数允许被修改) Args: pcollection (PCollection): 输入PCollection fn (function): 规约函数 *side_inputs: 参与运算的SideInputs **options: 可配置参数 Returns: PObject: 规约结果 >>

(pcollection, fn, *side_inputs, **options)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

sampleFunction · 0.70
generate_lineFunction · 0.50

Calls 1

reduceMethod · 0.80

Tested by

no test coverage detected