You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by Zoltan Farkas <zo...@yahoo.com.INVALID> on 2017/02/07 21:27:13 UTC
Can somebody look into merging this in?
See PR details bellow.
thank you
—Z
> Begin forwarded message:
>
> From: "Zoltan Farkas (JIRA)" <ji...@apache.org>
> Subject: [jira] [Commented] (AVRO-1997) Avro Field.defaultVal broken for Fixed fields.
> Date: February 7, 2017 at 1:56:41 PM EST
> To: dev@avro.apache.org
> Reply-To: dev@avro.apache.org
>
>
> [ https://issues.apache.org/jira/browse/AVRO-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15856544#comment-15856544 ]
>
> Zoltan Farkas commented on AVRO-1997:
> -------------------------------------
>
> i have created a pull request with a potential fix:
>
> https://github.com/apache/avro/pull/194
>
>> Avro Field.defaultVal broken for Fixed fields.
>> ----------------------------------------------
>>
>> Key: AVRO-1997
>> URL: https://issues.apache.org/jira/browse/AVRO-1997
>> Project: Avro
>> Issue Type: Bug
>> Components: java
>> Affects Versions: 1.8.1, 1.8.2
>> Reporter: Zoltan Farkas
>>
>> here is a unit test to reproduce the issue:
>> {code}
>> package org.apache.avro;
>> import java.nio.ByteBuffer;
>> import org.junit.Assert;
>> import org.junit.Test;
>> public class TestFixed {
>> @Test
>> public void testFixedDefaultValueDrop() {
>> Schema md5 = SchemaBuilder.builder().fixed("MD5").size(16);
>> Schema frec = SchemaBuilder.builder().record("test")
>> .fields().name("hash").type(md5).withDefault(ByteBuffer.wrap(new byte[16])).endRecord();
>> Schema.Field field = frec.getField("hash");
>> Assert.assertNotNull(field.defaultVal());
>> }
>> }
>> {code}
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.15#6346)
Re: Can somebody look into merging this in?
Posted by suraj acharya <su...@gmail.com>.
Hi Zoltan,
I took a look at the changes. And have provided my comments on it.
In the future I would recommend that you change the Jira status to Patch
Available and usually give a day or so for the reviews.
Converting it to Patch Available helps people in sorting all the patches
available and doing a review of those.
Thanks a lot for your contribution
-Suraj Acharya
On Tue, Feb 7, 2017 at 3:27 PM, Zoltan Farkas <zo...@yahoo.com.invalid>
wrote:
> See PR details bellow.
>
> thank you
>
> —Z
>
> > Begin forwarded message:
> >
> > From: "Zoltan Farkas (JIRA)" <ji...@apache.org>
> > Subject: [jira] [Commented] (AVRO-1997) Avro Field.defaultVal broken for
> Fixed fields.
> > Date: February 7, 2017 at 1:56:41 PM EST
> > To: dev@avro.apache.org
> > Reply-To: dev@avro.apache.org
> >
> >
> > [ https://issues.apache.org/jira/browse/AVRO-1997?page=
> com.atlassian.jira.plugin.system.issuetabpanels:comment-
> tabpanel&focusedCommentId=15856544#comment-15856544 ]
> >
> > Zoltan Farkas commented on AVRO-1997:
> > -------------------------------------
> >
> > i have created a pull request with a potential fix:
> >
> > https://github.com/apache/avro/pull/194
> >
> >> Avro Field.defaultVal broken for Fixed fields.
> >> ----------------------------------------------
> >>
> >> Key: AVRO-1997
> >> URL: https://issues.apache.org/jira/browse/AVRO-1997
> >> Project: Avro
> >> Issue Type: Bug
> >> Components: java
> >> Affects Versions: 1.8.1, 1.8.2
> >> Reporter: Zoltan Farkas
> >>
> >> here is a unit test to reproduce the issue:
> >> {code}
> >> package org.apache.avro;
> >> import java.nio.ByteBuffer;
> >> import org.junit.Assert;
> >> import org.junit.Test;
> >> public class TestFixed {
> >> @Test
> >> public void testFixedDefaultValueDrop() {
> >> Schema md5 = SchemaBuilder.builder().fixed("MD5").size(16);
> >> Schema frec = SchemaBuilder.builder().record("test")
> >> .fields().name("hash").type(md5).withDefault(ByteBuffer.wrap(new
> byte[16])).endRecord();
> >> Schema.Field field = frec.getField("hash");
> >> Assert.assertNotNull(field.defaultVal());
> >> }
> >> }
> >> {code}
> >
> >
> >
> > --
> > This message was sent by Atlassian JIRA
> > (v6.3.15#6346)
>
>