Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # dev >> Alternative use of record field default values?


Copy link to this message
-
Re: Alternative use of record field default values?
If you use Record builders you will currently get this behavior in the java
implementation[1].

AFAICT, there's no builder equivalent in the python implementation yet.

In python maybe we can skip having a builder because we can distinguish
between "key maps to None" from "Dict does not contain key".

Does that sound reasonable? Care to file a ticket and maybe propose a patch?
[1]:
http://avro.apache.org/docs/1.7.7/api/java/org/apache/avro/data/RecordBuilder.html

or more likely the generic implementation:

http://avro.apache.org/docs/1.7.7/api/java/org/apache/avro/generic/GenericRecordBuilder.html

or an example of the builder in generated specific code:

http://avro.apache.org/docs/current/gettingstartedjava.html#Creating+Users

On Mon, Aug 11, 2014 at 2:33 PM, Jeno I. Hajdu <[EMAIL PROTECTED]>
wrote:
Sean

 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB