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
Copy link to this message
-
Re: Question about Avro "records"
That sounds right to me.  To be clear, the schema in question here is
the writer's.  A reader schema which did not have "c" could read this,
dropping the "c" values from the writer's schema.

Doug

On Wed, Feb 27, 2013 at 2:14 PM, Francis Galiegue <[EMAIL PROTECTED]> wrote:
> On Wed, Feb 27, 2013 at 10:54 PM, Pankaj Shroff <[EMAIL PROTECTED]> wrote:
>> That doesn't seem the case specially because if you define a record with a
>> bunch of optional fields, then you would end up with an empty object (or
>> rather an object with null values for its fields). Am I misunderstanding
>> your question?
>>
>
> OK, I have probably misworded the question. Let's say I have a record
> defining fields "a" and "b". For simplicity, their permissible values
> are ints.
>
> As I understand it:
>
> { "a": 1 }
>
> is not legal since "b" is not provided.
>
> This:
>
> { "a": 1, "b": 2, "c": 3 }
>
> is not legal either since "c" is not defined.
>
> BUT: { "a": 1 } can be legal IF a default value is provided for "b".
>
> Am I getting this right, partially right, completely wrong?
>
> --
> Francis Galiegue, [EMAIL PROTECTED]
> JSON Schema in Java: http://json-schema-validator.herokuapp.com
+
Francis Galiegue 2013-02-27, 22:51
+
Doug Cutting 2013-02-27, 23:10
+
Francis Galiegue 2013-02-27, 23:55
+
Doug Cutting 2013-02-28, 01:12
+
Jeremy Kahn 2013-02-28, 01:30
+
Doug Cutting 2013-02-28, 17:11
+
Francis Galiegue 2013-02-28, 01:40