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

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

                Author: ASF GitHub Bot
            Created on: 12/Dec/18 01:48
            Start Date: 12/Dec/18 01:48
    Worklog Time Spent: 10m 
      Work Description: reuvenlax commented on a change in pull request #7233:  
[BEAM-4454] Add remaining functionality for AVRO schemas
URL: https://github.com/apache/beam/pull/7233#discussion_r240857906
 
 

 ##########
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/AvroUtils.java
 ##########
 @@ -340,9 +424,26 @@ public static GenericRecord toGenericRecord(
     return fieldType.getNullable() ? ReflectData.makeNullable(baseType) : 
baseType;
   }
 
+  @Nullable
   private static Object genericFromBeamField(
       Schema.FieldType fieldType, org.apache.avro.Schema avroSchema, Object 
value) {
-    org.apache.avro.Schema expectedSchema = getFieldSchema(fieldType);
+    TypeWithNullability typeWithNullability = new 
TypeWithNullability(avroSchema);
+    if (value == null) {
+      if (!typeWithNullability.nullable) {
 
 Review comment:
   good point

----------------------------------------------------------------
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: 174380)
    Time Spent: 9.5h  (was: 9h 20m)

> Provide automatic schema registration for AVROs
> -----------------------------------------------
>
>                 Key: BEAM-4454
>                 URL: https://issues.apache.org/jira/browse/BEAM-4454
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-java-core
>            Reporter: Reuven Lax
>            Assignee: Reuven Lax
>            Priority: Major
>          Time Spent: 9.5h
>  Remaining Estimate: 0h
>
> Need to make sure this is a compatible change



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

Reply via email to