You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Zoltan Farkas (JIRA)" <ji...@apache.org> on 2015/10/23 22:14:27 UTC

[jira] [Commented] (AVRO-1723) Add support for forward declarations in avro IDL

    [ https://issues.apache.org/jira/browse/AVRO-1723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14971761#comment-14971761 ] 

Zoltan Farkas commented on AVRO-1723:
-------------------------------------

The creative re-use of the null SCHEMA instead of the UnresolvedSchema is problematic!
The main reason is that you cannot have the same type twice in a union, and makes it impossible to declare union {null, SomeCircularType}
So this solution is not Workable.

Doug what is your suggestion?

> Add support for forward declarations in avro IDL
> ------------------------------------------------
>
>                 Key: AVRO-1723
>                 URL: https://issues.apache.org/jira/browse/AVRO-1723
>             Project: Avro
>          Issue Type: Improvement
>    Affects Versions: 1.8.0
>            Reporter: Zoltan Farkas
>
> Currently Recursive data structures like:
> record SampleNode {
>    int count = 0;
>    array<SamplePair> samples = [];
> }
> record SamplePair {
>  string name;
>  SampleNode node;
> }
> It is not possible to declare in IDL,
> however it is possible to declare in avsc (with fix from https://issues.apache.org/jira/browse/AVRO-1667 )
> It is actually not complicated to implement, here is some detail on a possible implementation:
> https://github.com/zolyfarkas/avro/commit/210c50105717149f3daa39b8d4160b8548b8e363
> This would close a capability gap with google protocol buffers...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)