[ 
https://issues.apache.org/jira/browse/GOBBLIN-987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hung Tran resolved GOBBLIN-987.
-------------------------------
    Fix Version/s: 0.15.0
       Resolution: Fixed

Issue resolved by pull request #2833
[https://github.com/apache/incubator-gobblin/pull/2833]

> 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)

Reply via email to