kennknowles commented on a change in pull request #13003:
URL: https://github.com/apache/beam/pull/13003#discussion_r499005140



##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/FieldValueTypeInformation.java
##########
@@ -118,6 +123,29 @@ public static FieldValueTypeInformation forField(Field 
field) {
         .build();
   }
 
+  public static <T extends AnnotatedElement & Member> String getNameOverride(
+      String original, T member) {
+    SchemaFieldName fieldName = member.getAnnotation(SchemaFieldName.class);
+    SchemaCaseFormat caseFormatAnnotation = 
member.getAnnotation(SchemaCaseFormat.class);
+    SchemaCaseFormat classCaseFormatAnnotation =
+        member.getDeclaringClass().getAnnotation(SchemaCaseFormat.class);

Review comment:
       I hate inheritance but I have to ask: what happens with
   
   ```
   @SchemaCaseFormat(A)
   class Parent {
     ... fields ...
   }
   
   @SchemaCaseFormat(B)
   class Child extends Parent { }
   ```
   
   I'm honestly not sure what should happen. I think in your case anything not 
overridden will get case format A. That seems right but just want to highlight 
it.




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


Reply via email to