avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vikas Saxena <vikas.saxena.2...@gmail.com>
Subject Re: Feature: Clear all fields / Reset all fields to default value on Record template
Date Tue, 06 Jan 2015 23:22:15 GMT
Hi Maulik,
Here is the git link
https://github.com/apache/avro/tree/branch-1.7/lang/c/src/avro

You will need to refer to value.h file for the function definition.

Thanks,
Vikas

On Wed, Jan 7, 2015 at 9:26 AM, Maulik Gandhi <mmg997@gmail.com> wrote:

> Hi Vikas,
>
> Can you share git link for function, which you are referring to. Is Java
> API for same available ?
>
> Thanks for replying.
> - Maulik
>
> On Tue, Jan 6, 2015 at 4:03 PM, Vikas Saxena <vikas.saxena.2006@gmail.com>
> wrote:
>
>> Hi Maulik,
>> I think the new Value API supports this.
>> I have worked on the C library of avro and I am using a function avro_value_reset
>> which does the same.
>> Calling this function on your record variable will reset the variable and
>> its sub-fields (including sub-records and their fields)  to their default
>> values.
>>
>> Thanks,
>> Vikas
>>
>> On Wed, Jan 7, 2015 at 8:33 AM, Maulik Gandhi <mmg997@gmail.com> wrote:
>>
>>> Hello Avro Users,
>>>
>>> Questions:
>>>
>>>    1. I was wondering if adding a functionality of clearing all fields
>>>    on Record, makes sense or not?
>>>    2. I was wondering if adding a functionality of reseting all fields
>>>    to default value (the default value would be what has been defined in AVDL)
>>>    on Record, makes sense or not?
>>>
>>> I did look up through old mail archive list and JIRA queue, but could
>>> not find anything similar, please point me to any documentation or links if
>>> I missed them.
>>>
>>> In order to achieve what I am asking here, my best guess is modifying
>>> existing Record template.  Please correct me if I am going on wrong path.
>>>
>>> *Record.vm*:
>>> https://github.com/apache/avro/blob/branch-1.7/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
>>>
>>> Thanks for your help and awesome work!!
>>>
>>> Thanks,
>>> - Maulik
>>>
>>
>>
>>
>> --
>> Thanks and regards,
>> Vikas Saxena.
>>
>
>


-- 
Thanks and regards,
Vikas Saxena.

Mime
View raw message