GitHub user nielsbasjes opened a pull request:

    https://github.com/apache/avro/pull/263

    AVRO-2114: Make missing value exceptions in nested structures easier to 
read.

    With this patch the exception of a missing nested fields looks like this 
below.
    The developer can now clearly see the path in the schema where the problem 
occurred.
    
    Please review.
    
    ```
    Field networkAddress type:STRING pos:1 not set and has no default value
    Path in schema: --> connection --> networkAddress
        at 
org.apache.avro.generic.GenericData.getDefaultValue(GenericData.java:999)
        at 
org.apache.avro.data.RecordBuilderBase.defaultValue(RecordBuilderBase.java:138)
        at 
org.apache.avro.test.http.NetworkConnection$Builder.build(NetworkConnection.java:290)
        at org.apache.avro.test.http.Request$Builder.build(Request.java:440)
        at 
org.apache.avro.specific.TestSpecificBuilderTree.failOnIncompleteTree(TestSpecificBuilderTree.java:78)
    
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nielsbasjes/avro AVRO-2114

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/avro/pull/263.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #263
    
----
commit 830b10627dbffc6d054579e250bfafc603f55e49
Author: Niels Basjes <[email protected]>
Date:   2017-12-12T12:09:40Z

    AVRO-2114: Make missing value exceptions in nested structures easier to 
read.

----


---

Reply via email to