Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.FlatMap function? #3

Open
BigB84 opened this issue Aug 9, 2021 · 2 comments
Open

.FlatMap function? #3

BigB84 opened this issue Aug 9, 2021 · 2 comments

Comments

@BigB84
Copy link

BigB84 commented Aug 9, 2021

Hi,

I really loved your library! However I couldn't find java .flatMap or go youthlin-stream .FlatMap equivalent.

Example:
A stream of different size string arrays into stream of these arrays content:
{ [a], [b, c], [d, e, f] } into { a, b, c, d, e, f }

Legend:
{} <- stream
[] <- non empty array that may contain min 1 string
a,b,c,... <- different length (in my case) strings

I need to call FlatMap in the middle of parallel executing stream, before I have 2 filter and 3 map calls, after 2 Map and 2 Filter calls.
I operate on 87 sets of data between 30 to 2'000'000 records that's why I really need parallel execution. (for each record i have regex, comparison to other string, etc. ) I shouldn't create additional middle datasets because it'd be huge memory leak

Thanks in advance :)

@jucardi
Copy link
Owner

jucardi commented Aug 18, 2021

HI @BigB84 I'll look into this to add this support. Thank you for the feedback

@rainbowechoes
Copy link

if it can be implemented, it will be more great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants