You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2010/07/01 22:35:51 UTC
[jira] Commented: (AVRO-590) IDL: order specifications don't work
[ https://issues.apache.org/jira/browse/AVRO-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884409#action_12884409 ]
Doug Cutting commented on AVRO-590:
-----------------------------------
Currently the IDL documentation suggests using something like:
{code}
@order("decreasing") int foo;
{code}
but this generates a field like:
{code}
{"name": "foo", "type": {"name": "int", "order": "decreasing"}}
{code}
but order is not a property of the int type but rather of the foo field, so this should rather be:
{code}
{"name": "foo", "type": "int", "order": "decreasing"}
{code}
One proposal is to change the syntax for order specification to use a keyword like:
{code}
decreasing int foo;
{code}
This would still permit @ to be used to specify attributes on the type, but not on the field. Alternately we might change @ to modify field attributes rather than type attributes. Or maybe the two could be distinguished by position relative to the type and field name, e.g.,
{code}
@order("decreasing") int @java-class("java.math.BigInteger") foo;
{code}
would specify one field and one type property, translating to:
{code}
{"name": "foo",
"type": {"name": "int", "java-class":" "java.math.BigInteger"},
"order": "decreasing"
}
{code}
Thoughts?
> IDL: order specifications don't work
> ------------------------------------
>
> Key: AVRO-590
> URL: https://issues.apache.org/jira/browse/AVRO-590
> Project: Avro
> Issue Type: Bug
> Components: java
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.4.0
>
>
> The IDL compiler has a mechanism for specifying field ordering, but it doesn't work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.