You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/12/02 18:44:00 UTC

[jira] [Work logged] (GOBBLIN-987) JsonRecordAvroSchemaToAvroConverter does not reject unrecognized Enum symbols

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

ASF GitHub Bot logged work on GOBBLIN-987:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Dec/19 18:43
            Start Date: 02/Dec/19 18:43
    Worklog Time Spent: 10m 
      Work Description: asfgit commented on pull request #2833: [GOBBLIN-987] Reject unrecognized Enum symbols in JsonRecordAvroSchemaToAvroConverter
URL: https://github.com/apache/incubator-gobblin/pull/2833
 
 
   
 
----------------------------------------------------------------
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:
users@infra.apache.org


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

    Worklog Id:     (was: 352094)
    Time Spent: 1h  (was: 50m)

> JsonRecordAvroSchemaToAvroConverter does not reject unrecognized Enum symbols
> -----------------------------------------------------------------------------
>
>                 Key: GOBBLIN-987
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-987
>             Project: Apache Gobblin
>          Issue Type: Bug
>            Reporter: Ahmed Abdul Hamid
>            Priority: Major
>             Fix For: 0.15.0
>
>         Attachments: invalid-enum-unit-test.patch
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Here is a failing unit test that demonstrates the issue we encounter when we attempt to encode the records produced by {{JsonRecordAvroSchemaToAvroConverter}} with unrecognized Enum symbols: [^invalid-enum-unit-test.patch]
> Here's how to apply the patch and run the test:
> {code:bash}
> $ git apply invalid-enum-unit-test.patch$ 
> $ ./gradlew :gobblin-core:test --tests *testEnumConversion*  {code}
> Here's the output:
> {code:java}
> java.lang.NullPointerException: null of string in field fieldToIgnore of org.apache.gobblin.test.TestRecord
>       at org.apache.avro.generic.GenericDatumWriter.npe(GenericDatumWriter.java:132)
>       at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:126)
>       at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:73)
>       at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:60)
>       at org.apache.gobblin.converter.avro.JsonRecordAvroSchemaToAvroConverterTest.testEnumConversion(JsonRecordAvroSchemaToAvroConverterTest.java:82) {code}
> The root cause of the issue is that {{JsonRecordAvroSchemaToAvroConverter}} allows unrecognized Enum symbols not declared in the specified Avro schema.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)