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

Ben McCann commented on AVRO-1505:
----------------------------------

Can we remove the "Fix Version/s: 1.7.8"? It seems like this would be better 
targeted towards master than the 1.7 branch

> Generic comparator features definable in avro schema
> ----------------------------------------------------
>
>                 Key: AVRO-1505
>                 URL: https://issues.apache.org/jira/browse/AVRO-1505
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>    Affects Versions: 1.7.6
>         Environment: same as for hadoop 2.3.0
>            Reporter: Dr. Martin Menzel
>            Priority: Minor
>              Labels: patch
>             Fix For: 1.7.8
>
>         Attachments: AVRO-1505.patch.gz, CompoundDataExportKeyExtended2.avsc, 
> GenericComparator.java, GenericData.java, TestGenericComparator.java
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> This patch allows to add additional optional comparator informations to the 
> avro schema for record types.
> An example is included in the patch 
> CompoundDataExportKeyExtended2.avsc
> ...snip...
>      {"name": "seqNo", "type": "int",                       "comparators" : [
>                                                                            { 
> "name":"default",   "compareIdx" : 3, "order":"ascending" }, 
>                                                                            { 
> "name":"grouping1", "compareIdx" : 3, "order":"ignore"  } ,
>                                                                            { 
> "name":"grouping2", "compareIdx" : 3, "order":"ignore"  } 
>                                                                          ]},
> ...snip...
> in the comparators property of a field definition multiple compartor 
> informations can be defined. Often used when defining GroupingCompartors with 
> compound keys is order="ignore" so that the keys are just compared with 
> respect to some special (not ignored fields)
> The necessary changes are made in GenericData class with a fall back to the 
> standard behavior if no comparators are defined.
> An example generic Compartor is delivered with this patch called:
> org.woopi.avro.GenericComparator
> Maybe this class can be included in the avro bundle. In this case the package 
> can be adapted to org.apache.
> The TestCase tests several different situations and is called.
> TestGenericComparator.java



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to