[ 
https://issues.apache.org/jira/browse/AVRO-247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784377#action_12784377
 ] 

Doug Cutting commented on AVRO-247:
-----------------------------------

This test is using a schema generated via reflection to process data written 
with a different, incompatible schema.  The reflected schema includes a record 
named org.apache.avro.util.Utf8 that contains a byte[] field where the schema 
in the file contains simply "string".  Perhaps to fix this we should add an 
@Stringable annotation used by reflection that indicates that a class should be 
represented by an Avro string. The toString() method can be used to write 
instances, and its one-String-argument constructor can be used when reading.  
Then the specific generator can add this annotation, so specific data can be 
correctly reflected.  Does this make sense?

Another alternative would be to abandon Utf8 in specific and reflect, but that 
would compromise performance, since not only can Java strings not be reused, 
but they force UTF-8 processing on creation rather than permitting it to be 
delayed until a Java String is needed.

> Broken test: org.apache.avro.TestDataFile$InteropTest.testGeneratedReflect()
> ----------------------------------------------------------------------------
>
>                 Key: AVRO-247
>                 URL: https://issues.apache.org/jira/browse/AVRO-247
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>            Reporter: Philip Zeyliger
>
> The current trunk has a broken java-interop test.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to