Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

[JIT] flat_map operator with Option output #339

Open
mihaibudiu opened this issue Mar 17, 2023 · 2 comments
Open

[JIT] flat_map operator with Option output #339

mihaibudiu opened this issue Mar 17, 2023 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@mihaibudiu
Copy link

Does the JIT compiler support this use of the flat_map operator?

        let filter0: _ = move |r: &Tuple6<i32, F64, bool, String, Option<i32>, Option<F64>>, | -> Option<Tuple6<i32, F64, bool, String, Option<i32>, Option<F64>>> {
            (if r.4.is_none() {
                None::<Tuple6<i32, F64, bool, String, Option<i32>, Option<F64>>>
            } else {
                Some(r.clone())
            })
        };
        let stream0: Stream<_, OrdZSet<Tuple6<i32, F64, bool, String, Option<i32>, Option<F64>>, Weight>> = T.flat_map(filter0);
@Kixiron
Copy link
Contributor

Kixiron commented Mar 17, 2023

Yes, but for this specific case you should use FilterMap

@mihaibudiu
Copy link
Author

Is there an example with FilterMap?

@mihaibudiu mihaibudiu added the question Further information is requested label Apr 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants