[ https://issues.apache.org/jira/browse/BEAM-4454?focusedWorklogId=174249&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-174249 ]
ASF GitHub Bot logged work on BEAM-4454: ---------------------------------------- Author: ASF GitHub Bot Created on: 11/Dec/18 20:04 Start Date: 11/Dec/18 20:04 Worklog Time Spent: 10m Work Description: kanterov 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_r240586530 ########## 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: Isn't this case handled by the check at line 438? As I understand, with reordering these two checks it could be simply: ```java if (value == null) { return value; } ``` ---------------------------------------------------------------- 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: 174249) Time Spent: 6h 50m (was: 6h 40m) > 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: 6h 50m > Remaining Estimate: 0h > > Need to make sure this is a compatible change -- This message was sent by Atlassian JIRA (v7.6.3#76005)