avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Busbey (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AVRO-1997) Avro Field.defaultVal broken for Fixed fields.
Date Tue, 28 Feb 2017 14:52:45 GMT

     [ https://issues.apache.org/jira/browse/AVRO-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sean Busbey updated AVRO-1997:
------------------------------
       Resolution: Fixed
    Fix Version/s: 1.9.0
           Status: Resolved  (was: Patch Available)

I reverted and reapplied this change with a proper commit message, backporting it to 1.8.
[~thiru_mg], please ensure the JIRA key is in future merged patches and please include a "closes
#XX" for issues having a github PR. Also please close issues with a relevant fixVersion when
the patch is pushed.

[~zolyfarkas] please draft a proper release note that explains this change to downstream users.

I still don't see anything addressing [~sacharya]'s review questions on the PR. [~zolyfarkas]
please make sure there's a follow on jira if needed.

> 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
>            Assignee: Zoltan Farkas
>              Labels: pull-request-available
>             Fix For: 1.9.0, 1.8.2
>
>
> 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)

Mime
View raw message