[jira] [Commented] (AVRO-1997) Avro Field.defaultVal broken for Fixed fields.
[ https://issues.apache.org/jira/browse/AVRO-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1534#comment-1534 ] Sean Busbey commented on AVRO-1997: --- release notes should state to downstream users what they can expect from a change, especially if it changed behavior but not an API method signature. I haven't reviewed this patch, but I would label as a bug returning null for fixed fields that define a default value. > 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)
[jira] [Commented] (AVRO-1997) Avro Field.defaultVal broken for Fixed fields.
[ https://issues.apache.org/jira/browse/AVRO-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15888614#comment-15888614 ] Zoltan Farkas commented on AVRO-1997: - [~busbey] Here is the release note to describe the original issue: "Schema.Field.defaultVal() returns null for fields of type fixed even if the field has a default value." let me know if this is enough or not. thank you > 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)
[jira] [Commented] (AVRO-1997) Avro Field.defaultVal broken for Fixed fields.
[ https://issues.apache.org/jira/browse/AVRO-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15888145#comment-15888145 ] ASF subversion and git services commented on AVRO-1997: --- Commit 37ce7f72478fcd3dd15637efe25b422f9631bacc in avro's branch refs/heads/master from [~zolyfarkas] [ https://git-wip-us.apache.org/repos/asf?p=avro.git;h=37ce7f7 ] AVRO-1997 [java] get/set defaults for fixed. closes #194. Signed-off-by: Thiruvalluvan M G> 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.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)
[jira] [Commented] (AVRO-1997) Avro Field.defaultVal broken for Fixed fields.
[ https://issues.apache.org/jira/browse/AVRO-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15887229#comment-15887229 ] Thiruvalluvan M. G. commented on AVRO-1997: --- Merged. Thanks [~zolyfarkas] > 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.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)
[jira] [Commented] (AVRO-1997) Avro Field.defaultVal broken for Fixed fields.
[ https://issues.apache.org/jira/browse/AVRO-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15867909#comment-15867909 ] Zoltan Farkas commented on AVRO-1997: - I see this JIRA has been assigned to me, however I am not sure what do I have to do next... See my previous comment with the pull request... Somebody should review the pull request and merge it in... > 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 > > 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)
[jira] [Commented] (AVRO-1997) Avro Field.defaultVal broken for Fixed fields.
[ https://issues.apache.org/jira/browse/AVRO-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)