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

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

                Author: ASF GitHub Bot
            Created on: 06/Nov/18 20:43
            Start Date: 06/Nov/18 20:43
    Worklog Time Spent: 10m 
      Work Description: akedin commented on a change in pull request #6832: 
[BEAM-4461] CoGroup transforms for schemas.
URL: https://github.com/apache/beam/pull/6832#discussion_r231277875
 
 

 ##########
 File path: sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/Schema.java
 ##########
 @@ -209,6 +209,25 @@ public boolean equals(Object o) {
         && Objects.equals(getFields(), other.getFields());
   }
 
+  /** Returns true if two schemas are equal ignoring field names and 
descriptions. */
+  public boolean typesEqual(Schema other) {
+    if (uuid != null && other.uuid != null && Objects.equals(uuid, 
other.uuid)) {
+      return true;
+    }
+    if (!Objects.equals(fieldIndices.values(), other.fieldIndices.values())) {
+      return false;
+    }
+    if (getFieldCount() != other.getFieldCount()) {
+      return false;
 
 Review comment:
   would it make sense to check the field count first before checking the 
`fieldIndices` equality?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 163193)
    Time Spent: 17h 40m  (was: 17.5h)

> Create a library of useful transforms that use schemas
> ------------------------------------------------------
>
>                 Key: BEAM-4461
>                 URL: https://issues.apache.org/jira/browse/BEAM-4461
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-java-core
>            Reporter: Reuven Lax
>            Assignee: Reuven Lax
>            Priority: Major
>          Time Spent: 17h 40m
>  Remaining Estimate: 0h
>
> e.g. JoinBy(fields). Project, Filter, etc.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to