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

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

                Author: ASF GitHub Bot
            Created on: 07/Jan/19 16:06
            Start Date: 07/Jan/19 16:06
    Worklog Time Spent: 10m 
      Work Description: kanterov commented on pull request #7289: [BEAM-6240] 
Add a library of schema annotations for POJO and JavaBeans
URL: https://github.com/apache/beam/pull/7289#discussion_r245704472
 
 

 ##########
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/FieldValueTypeSupplier.java
 ##########
 @@ -28,8 +29,10 @@
  */
 public interface FieldValueTypeSupplier extends Serializable {
   /**
-   * Return all the FieldValueTypeInformations. The returned list must be in 
the same order as
+   * Return all the FieldValueTypeInformations.
+   *
+   * <p>If the schema parameter is not null, then the returned list must be in 
the same order as
    * fields in the schema.
    */
-  List<FieldValueTypeInformation> get(Class<?> clazz, Schema schema);
+  List<FieldValueTypeInformation> get(Class<?> clazz, @Nullable Schema schema);
 
 Review comment:
   There are few implementations where we override it to non-nullable that 
should be modified.
   
   Looking into `FieldValueTypeSupplier#get` it feels that `@Nullable Schema 
schema` is only used to re-order fields. I would suggest moving this logic 
outside in usages where it's needed. Now it's confusing to see the case when 
`schema=null`, with moving sorting outside it wouldn't be needed.
   
   What do you think?
   
   
 
----------------------------------------------------------------
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: 181878)
    Time Spent: 3h 10m  (was: 3h)

> Allow users to annotate POJOs and JavaBeans for richer functionality
> --------------------------------------------------------------------
>
>                 Key: BEAM-6240
>                 URL: https://issues.apache.org/jira/browse/BEAM-6240
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-java-core
>            Reporter: Reuven Lax
>            Assignee: Reuven Lax
>            Priority: Major
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Desired annotations:
>   * SchemaIgnore - ignore this field
>   * FieldName - allow the user to explicitly specify a field name
>   * SchemaCreate - register a function to be used to create an object (so 
> fields can be final, and no default constructor need be assumed).



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

Reply via email to