Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Avro >> mail # user >> Question about Avro "records"


+
Francis Galiegue 2013-02-27, 21:47
+
Pankaj Shroff 2013-02-27, 21:54
+
Francis Galiegue 2013-02-27, 22:14
+
Pankaj Shroff 2013-02-27, 22:21
+
Francis Galiegue 2013-02-27, 22:52
+
Doug Cutting 2013-02-27, 22:20
+
Francis Galiegue 2013-02-27, 22:51
+
Doug Cutting 2013-02-27, 23:10
+
Francis Galiegue 2013-02-27, 23:55
Copy link to this message
-
Re: Question about Avro "records"
I don't think that's valid.  In general a value should be written for
each field in the writer's schema.  It's not ideal for json, but those
are the rules for binary and it's best if such read/write logic can be
unaware of whether json or binary are being produced.  I suspect such
json would break existing implementations, but I've not checked.

Doug

On Wed, Feb 27, 2013 at 3:55 PM, Francis Galiegue <[EMAIL PROTECTED]> wrote:
> On Thu, Feb 28, 2013 at 12:10 AM, Doug Cutting <[EMAIL PROTECTED]> wrote:
>> On Wed, Feb 27, 2013 at 2:51 PM, Francis Galiegue <[EMAIL PROTECTED]> wrote:
>>> Hmm, OK, the reader/writer distinction is something I am not accustomed to.
>>
>> http://avro.apache.org/docs/current/spec.html#Schema+Resolution
>>
>> Doug
>
> Hmmm, that does not quite answer my question about production of default values.
>
> For instance, when emitting data from an avro schema which reads:
>
> {
>     "type": "record",
>     "name": "whatever",
>     "fields": [ { "name": "a", "type": { "type": "int", "default": 0 } } ]
> }
>
> is emitting {} legal?
>
>
> --
> Francis Galiegue, [EMAIL PROTECTED]
> JSON Schema in Java: http://json-schema-validator.herokuapp.com
+
Jeremy Kahn 2013-02-28, 01:30
+
Doug Cutting 2013-02-28, 17:11
+
Francis Galiegue 2013-02-28, 01:40