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

Philip Zeyliger commented on AVRO-278:
--------------------------------------

Looks very reasonable.

bq.  GenericData.java: @SuppressWarnings(value="unchecked")

Eclipse is teling me this is unnecessary now.  I may not have the same settings 
as our compiler, but worth a shot at removing it.

Does the Avro code-base typically put the @Override annotation for implemented 
interface methods?  I think the answer is no, but if the answer is yes, then 
GenericData$Record is missing them.

bq. GenericData.java: String name = e.getKey();

I believe this is unused.

bq. GenericRecord.java

This is an incompatible change, since the interface is changed significantly.  
That's fine, but ought to be noted.

The JavaDoc should indicate where the field numbers must come from.

bq. GenericRecord.java: "A set of fields, each a name/value pair."

Does that make sense as an explanation?  The keys aren't stored any more, for 
one thing.

It may be worth noting that a GenericRecord's underyling schema is always a 
RecordSchema (obvious, but an invariant nonetheless).  It may also be worth 
nothing that to re-use a GenericRecord, you can set all the fields to "null".  
(Or is that not the right thing?)

> use array instead of map to implement generic records
> -----------------------------------------------------
>
>                 Key: AVRO-278
>                 URL: https://issues.apache.org/jira/browse/AVRO-278
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Doug Cutting
>             Fix For: 1.3.0
>
>         Attachments: AVRO-278.patch
>
>
> It would be considerably faster to implement GenericData.Record as an array 
> rather than as a HashMap.  We expect generic data to be a major incentive to 
> using Avro, and users of Java's generic API should not pay a performance 
> penalty.

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