[ https://issues.apache.org/jira/browse/AVRO-2402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Werner Daehn updated AVRO-2402: ------------------------------- Flags: Patch,Important Priority: Critical (was: Major) Description: (This is now the second project where I needed a functionality like this in Avro. Hence I would greatly appreciate it if you can add that to the 1.10.0 release. I took extra care to make it simple and without any side effects.) 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 GenericData.Record and Array to contain the method * getParent() as well. With that you can easily walk the nested tree of a deeply nested Schema up and now down as well. was: 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. > 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: Critical > Attachments: AVRO-2402.patch > > > (This is now the second project where I needed a functionality like this in > Avro. Hence I would greatly appreciate it if you can add that to the 1.10.0 > release. I took extra care to make it simple and without any side effects.) > > 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 GenericData.Record and Array to contain the method > * getParent() > as well. > With that you can easily walk the nested tree of a deeply nested Schema up > and now down as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)