You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/03 23:49:30 UTC

[GitHub] [beam] kennknowles opened a new issue, #19359: Allow multiple Joins in the same pipeline

kennknowles opened a new issue, #19359:
URL: https://github.com/apache/beam/issues/19359

   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:
   ```
   
   @Test
   public void testMultipleJoinsInSamePipeline() { 
     leftListOfKv.add(KV.of("Key2", 4L)); 
   
    PCollection<KV<String, Long>> leftCollection = p.apply("CreateLeft", Create.of(leftListOfKv));
     rightListOfKv.add(KV.of("Key2",
   "bar")); 
     PCollection<KV<String, String>> rightCollection = p.apply("CreateRight", Create.of(rightListOfKv));
   
    expectedResult.add(KV.of("Key2", KV.of(4L, "bar")));
     PCollection<KV<String, KV<Long, String>>> output1
   = Join.innerJoin(leftCollection, rightCollection);
     PCollection<KV<String, KV<Long, String>>> output2
   = Join.innerJoin(leftCollection, rightCollection);
    PAssert.that(output1).containsInAnyOrder(expectedResult);
   
   PAssert.that(output2).containsInAnyOrder(expectedResult);
    p.run(); 
   }
   
   ```
   
   This fails because of clashing names in the pipeline and there is currently no way to use the join library to give the joins different names.
   
   Therefore I find myself routinely wrapping joins in new PTransforms which leads me to believe that this should be part of the library itself.
   
    
   
   Imported from Jira [BEAM-6719](https://issues.apache.org/jira/browse/BEAM-6719). Original Jira may contain additional context.
   Reported by: DanielMe.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org