Re: Why is FlatMap different from composing Flatten and Map?

2023-03-15 Thread Robert Bradshaw via user
On Mon, Mar 13, 2023 at 11:33 AM Godefroy Clair wrote: > Hi, > I am wondering about the way `Flatten()` and `FlatMap()` are implemented > in Apache Beam Python. > In most functional languages, FlatMap() is the same as composing > `Flatten()` and `Map()` as indicated by the name, so Flatten() and

Re: Why is FlatMap different from composing Flatten and Map?

2023-03-15 Thread Reuven Lax via user
In Apache Beam, Flatten is a union operation - it takes multiple PCollections (of the same type) and merges them into a single PCollection. On Mon, Mar 13, 2023 at 11:32 AM Godefroy Clair wrote: > Hi, > I am wondering about the way `Flatten()` and `FlatMap()` are implemented > in Apache Beam

Re: Why is FlatMap different from composing Flatten and Map?

2023-03-15 Thread Alexey Romanenko
+CC people who might give more details on this. — Alexey > On 13 Mar 2023, at 19:32, Godefroy Clair wrote: > > Hi, > I am wondering about the way `Flatten()` and `FlatMap()` are implemented in > Apache Beam Python. > In most functional languages, FlatMap() is the same as composing `Flatten()`

Why is FlatMap different from composing Flatten and Map?

2023-03-13 Thread Godefroy Clair
Hi, I am wondering about the way `Flatten()` and `FlatMap()` are implemented in Apache Beam Python. In most functional languages, FlatMap() is the same as composing `Flatten()` and `Map()` as indicated by the name, so Flatten() and Flatmap() have the same input. But in Apache Beam, Flatten() is