[ https://issues.apache.org/jira/browse/AVRO-251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789949#action_12789949 ]
Philip Zeyliger commented on AVRO-251: -------------------------------------- More thoughts: My main reservation here is using the Decoder/Encoder API (instead of a higher-level one) for decoding and encoding the binary form. If you're curious, Protocol Buffer's version of the PB that describes PBs is at http://code.google.com/p/protobuf/source/browse/trunk/src/google/protobuf/descriptor.proto bq. Default values Thinking about *default values* once more, I think you could encode them in binary. Store them in a "bytes" type, and force users to decode them according to the schema that the default value corresponds to. More compact, and no JSON conceptual dependency. (This pattern is generally sometimes useful: "dynamic schemas" within an avro file. bq. public abstract void writeIndex(int unionIndex) Is Encoder.java a public api? Is it too late to rename writeIndex to writeUnionTag? Had to scratch my head there until I looked at the code. bq. private static final int NAME_INDEX = Type.values().length; >From a maintainability perspective, it scares me that Type.values() has to be >kept in sync with the order of the types in the union in Schema.m4. The >"string" that corresponds to NAME_INDEX in Schema.m4 deserves a comment; it's >a pretty different category than the others. It seems that instead of string, >it could be a record (that contains a string) called "reference", or just use >a comment. bq. writeSchema... This method uses the Encoder API to write an AVRO record. Is there a reason not to use the Specific or Generic APIs instead? I think the same thing about readSchema(). bq. readJson() Is this method decoding AVRO's json schema into JSON objects? You should spell that out more clearly; there are a lot of different things json could refer to in this class. > add schema for schemas > ---------------------- > > Key: AVRO-251 > URL: https://issues.apache.org/jira/browse/AVRO-251 > Project: Avro > Issue Type: New Feature > Components: java > Reporter: Doug Cutting > Assignee: Doug Cutting > Fix For: 1.3.0 > > Attachments: AVRO-251.patch, AVRO-251.patch > > > A schema for schemas would permits schemas to be written in binary. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.