avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rosenstrauch <dar...@darose.net>
Subject Adding arbitrary property on record field
Date Tue, 27 Jul 2010 20:33:59 GMT
It looks as though it's not possible to add an arbitrary property on a 
record field.  e.g., in the following example, although the schema 
parses fine, the "alias" property gets thrown away:

	"name": "KVPair",
	"type": "record",
	"fields" : [
		{"name": "key", "type": "int", "alias": "EventTime"},
		{"name": "values", "type": "bytes"}

I had read the Avro spec and thought this was actually allowed. 
("Attributes not defined in this document are permitted as metadata, but 
must not affect the format of serialized data.")

Am I wrong, or is this a bug/omission?  Seems like it would be a really 
useful feature to have.  And near as I can tell, the only other way to 
achieve the same behavior would be to do some kind of hack using the 
field's "doc" attribute.



View raw message