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:21:51 UTC
[jira] Created: (AVRO-590) IDL: order specifications don't work
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.
[jira] Commented: (AVRO-590) IDL: order specifications don't work
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900538#action_12900538 ]
Doug Cutting commented on AVRO-590:
-----------------------------------
The last proposal above seems best, to permit one to specify arbitrary properties for both the field and for it's type. However I think I'd reverse the order, so that properties near to the type would be for the type and properties near the field name would be for the field. So the above example might become:
{code}
@java-class("java.math.BigInteger") int foo @order("decreasing");
{code}
> 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.
[jira] Updated: (AVRO-590) IDL: order specifications don't work
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting updated AVRO-590:
------------------------------
Status: Resolved (was: Patch Available)
Resolution: Fixed
I just committed this.
> 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
>
> Attachments: AVRO-590.patch
>
>
> 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.
[jira] Updated: (AVRO-590) IDL: order specifications don't work
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting updated AVRO-590:
------------------------------
Attachment: AVRO-590.patch
Here's a patch that fixes this. Attributes modify what they precede. If they precede a field type, then they modify it's schema, if they precede a field name, they modify the field itself. Since ordering is an attribute of a field, order attributes must immediately precede the field name.
Tests included, documentation updated.
> 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
>
> Attachments: AVRO-590.patch
>
>
> 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.
[jira] Commented: (AVRO-590) IDL: order specifications don't work
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (AVRO-590) IDL: order specifications don't work
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting updated AVRO-590:
------------------------------
Status: Patch Available (was: Open)
> 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
>
> Attachments: AVRO-590.patch
>
>
> 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.