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

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

                Author: ASF GitHub Bot
            Created on: 08/Jan/19 12:15
            Start Date: 08/Jan/19 12:15
    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_r245974657
 
 

 ##########
 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:
   Since given schema there is only a single correct way to perform sorting, do 
you mean to have:
   
   ```java
   interface FieldValueTypeSupplier {
     default List< FieldValueTypeInformation> get(Class<?> clazz, Schema 
schema) { ... }
     List< FieldValueTypeInformation> get(Class<?> clazz);
   
   }
   ```
   
   It sounds good. Otherwise, we would have to duplicate sorting either in 
call-site or in each implementation of `FieldValueTypeSupplier`
 
----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 182352)
    Time Spent: 5h 50m  (was: 5h 40m)

> 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: 5h 50m
>  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