Grokbase Groups Avro dev June 2013
I assume he means the difference between:

{"type":"record", "name":"ForwardRef", "fields":[
   {"name":"thing_ref", "type": "five bytes"},
   {"name":"thing_declared", "type": {"type":"fixed", "size":5,
"name":"five bytes"}}

{"type":"record", "name":"BackRef", "fields":[
   {"name":"thing_declared", "type": {"type":"fixed", "size":5,
"name":"five bytes"}}
   {"name":"thing_ref", "type": "five bytes"},

The Avro spec does not currently support the first of the above,
references must be declared before being used.

We could change this, but every language implementation would need to be
updated, and it could create some compatibility issues (old code would not
necessarily parse new schemas).
New features for avro schemas since the start have almost entirely been
forwards-compatible. The rare exceptions have been when bug fixes or
language differences necessitated otherwise.

At the moment, most of the schema parsers eagerly decode named references
rather than being lazy.
On 6/24/13 10:19 AM, "Thiruvalluvan MG" wrote:

Hi Thomas Dressel,

Is it possible to elaborate on what you mean by "forward declaration"?
I'm aware of one usage of the term in C and C++ where instead of exposing
the full definition of a function, data or class you expose just its
declaration and then supply the full definition later. Here is an example
with class declaration:

class X;

class Y {
X* x;

class X {
Y *y;

This is the only way to handle circular references between classes X and
Y. But I don't understand its reference to Avro.

Still better, can you give a small example of what you are trying to do?

Thank you,


From: Thomas Dressel <>
Sent: Monday, 24 June 2013 7:10 PM
Subject: Forward Declaration


I've searched the web and the Documentation of Avro, but I didn't get
an answer.
So I write this email to you, with the question, if Avro does support
forward declaration?

I look forward to hearing from you soon.

Yours faithfully,

Thomas Dressel

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 4 | next ›
Discussion Overview
groupdev @
postedJun 24, '13 at 4:59p
activeJun 28, '13 at 4:14p



site design / logo © 2021 Grokbase