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

Scott Carey commented on AVRO-637:
----------------------------------

Another way to frame this is:

What is the purpose of this ticket?

1:  To allow users to avoid having to use/learn GenericArray for populating 
records with data?  
or
2:  To use the most generic applicable built-in Java interface to define the 
type that an Avro array is?

If it is #1, I feel that List<> is the most appropriate because it is 
semantically the same as GenericArray was.
If it is #2, I feel that Iterable is a better generalization for an Avro array 
than Collection.

> GenericArray should implement Collection
> ----------------------------------------
>
>                 Key: AVRO-637
>                 URL: https://issues.apache.org/jira/browse/AVRO-637
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Doug Cutting
>            Assignee: Doug Cutting
>             Fix For: 1.5.0
>
>         Attachments: AVRO-637.patch, AVRO-637.patch
>
>
> It would be nice if Avro arrays were better integrated with Java collections. 
>  The GenericArray interface permits array element reuse, which is awkward 
> with java.util.Collection.  But if GenericArray implemented Collection and 
> the Avro runtime permitted arbitrary Collection implementations to be passed 
> for Arrays then it would simplify many applications.  The runtime could still 
> reuse elements if an array implemented GenericArray, so performance would not 
> suffer for applications that, e.g., loop over a data file, reusing instances.

-- 
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