Add support for side inputs/outputs to Java 8 lambdas in MapElements
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
Currently there's no way to use side inputs or outputs within Java 8 lambdas and MapElements. It would be nice if you could do something like this:
```
PCollection wordLengths = words.apply(
MapElements.via((String word) -> {
int sideInput1=
[[[ GetSideInputHere(); ]]]
[[[ SetSideOutputHere ]]] (sideInput1+word.length());
return
word.length();
}).withOutputType(new TypeDescriptor() {});
```
Imported from Jira [BEAM-656](https://issues.apache.org/jira/browse/BEAM-656). Original Jira may contain additional context.
Reported by: jpatokal.
Contributor guide
Research direction
Start with the MapElements API and its Java 8 lambda support, then consult the linked BEAM-656 Jira issue for context not included here. Done means Java 8 lambdas used with MapElements can access side inputs and produce side outputs while preserving the main output behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100