[
https://issues.apache.org/jira/browse/AVRO-2402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Werner Daehn updated AVRO-2402:
-------------------------------
Release Note: Is a side effect free addition of code. All tests passed.
Attachment: AVRO-2402.patch
Status: Patch Available (was: Open)
I have tried various versions of implementations, this one is by far the
cleanest. Has no side effect, no performance impact.
> Generics, provide access to parent object
> -----------------------------------------
>
> Key: AVRO-2402
> URL: https://issues.apache.org/jira/browse/AVRO-2402
> Project: Apache Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.10.0
> Reporter: Werner Daehn
> Priority: Major
> Attachments: AVRO-2402.patch
>
>
> Imagine you are within the GenericRecord Employee->Addresses. You have all
> fields of the Addresses Schema of course but what if you need to read
> something from the parent, the employee record?
> You would need to remember the entire parent tree, which is fine if you are
> just one level deep but can be cumbersome when the structure is 10 levels
> deep.
> I'd like the GenericDatumReader to return objects that have the methods
> * getParent()
> * getRoot()
> as well.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)