[BEAM-6719] Allow multiple Joins in the same pipeline #7813
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change wraps the joins from the joinlibrary extension in individual PTransforms. I also provide overloaded methods which allow to name the corresponding nodes in the graph.
The background of this change is that currently it is not possible to have multiple joins in the same pipeline without wrapping them in individual PTransforms as this would generate name clashes.
Consider the following test case:
With the change contained in this PR, the same code would still fail but there is now an overloaded call to
Join.innerJoinso that the corresponding nodes in the execution graph receive different names (see test case below).The change is backwards compatible. Two other side benefits are:
The naming of the transformation is slightly more intuitive in case you want to debug / look at the execution graph it's now easier to see which steps correspond to the join.
It also allows using the
PTransformdirectly writing something likemyCollection1.apply(InnerJoin.with(myCollection2))which some people might find more intuitive.Choose reviewer(s) and mention them in a comment (
R: @username).Format the pull request title like
[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.If this contribution is large, please file an Apache Individual Contributor License Agreement.
Post-Commit Tests Status (on master branch)