[ 
https://issues.apache.org/jira/browse/BEAM-10327?focusedWorklogId=452244&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-452244
 ]

ASF GitHub Bot logged work on BEAM-10327:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Jun/20 09:48
            Start Date: 29/Jun/20 09:48
    Worklog Time Spent: 10m 
      Work Description: rezarokni commented on a change in pull request #12097:
URL: https://github.com/apache/beam/pull/12097#discussion_r446765181



##########
File path: 
examples/java/src/test/java/org/apache/beam/examples/snippets/SnippetsTest.java
##########
@@ -154,6 +156,73 @@ public void testCoGroupByKeyTuple() throws IOException {
     p.run();
   }
 
+  /* Tests SchemaJoinPattern */
+  @Test
+  public void testSchemaJoinPattern() {
+    // [START SchemaJoinPatternCreate]
+    // Define Schemas
+    Schema emailSchema =
+        Schema.of(
+            Schema.Field.of("name", Schema.FieldType.STRING),
+            Schema.Field.of("email", Schema.FieldType.STRING));
+
+    Schema phoneSchema =
+        Schema.of(
+            Schema.Field.of("name", Schema.FieldType.STRING),
+            Schema.Field.of("phone", Schema.FieldType.STRING));
+
+    // Create User Data Collections
+    final List<Row> emailUsers =

Review comment:
       Consider if adding a non-match would help the sample. For example a 
missing id from emailUsers or the other. So that the reader is clear on the 
output when no match occurs.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 452244)
    Time Spent: 1h 20m  (was: 1h 10m)

> Patterns: Create a pattern showing use of Schema
> ------------------------------------------------
>
>                 Key: BEAM-10327
>                 URL: https://issues.apache.org/jira/browse/BEAM-10327
>             Project: Beam
>          Issue Type: New Feature
>          Components: website
>            Reporter: Abhishek Yadav
>            Assignee: Abhishek Yadav
>            Priority: P3
>              Labels: pipeline-patterns
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Currently the Documentation shows how we can perform a Join of PCollections 
> using 
> [CoGroupByKey|https://beam.apache.org/documentation/programming-guide/#cogroupbykey],
>  but it requires a lot of boilerplate code, it would be nice to have a 
> pattern that shows using Joins with the help of 
> [Schemas|https://beam.apache.org/documentation/programming-guide/#what-is-a-schema].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to