You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "reuvenlax (via GitHub)" <gi...@apache.org> on 2023/02/02 18:25:18 UTC

[GitHub] [beam] reuvenlax commented on a diff in pull request #25268: Adding support for @SchemaFieldDescription annotation that allows ann…

reuvenlax commented on code in PR #25268:
URL: https://github.com/apache/beam/pull/25268#discussion_r1094915579


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/FieldValueTypeInformation.java:
##########
@@ -167,6 +174,15 @@ public static <T extends AnnotatedElement & Member> String getNameOverride(
     }
   }
 
+  public static <T extends AnnotatedElement & Member> String getFieldDescription(T member) {

Review Comment:
   return value should be @Nullable



##########
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/Schema.java:
##########
@@ -1121,7 +1121,8 @@ public boolean typesEqual(Field other) {
 
     private boolean equivalent(Field otherField, EquivalenceNullablePolicy nullablePolicy) {
       return getName().equals(otherField.getName())
-          && getType().equivalent(otherField.getType(), nullablePolicy);
+          && getType().equivalent(otherField.getType(), nullablePolicy)
+          && getDescription().equals(otherField.getDescription());

Review Comment:
   I'm not sure that description should be included here as it's not really part of the type.



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

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