avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AVRO-1327) Having GenericEnumSymbol implement Comparable (mimic'ing java's Enum)
Date Thu, 09 May 2013 21:01:17 GMT

     [ https://issues.apache.org/jira/browse/AVRO-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Doug Cutting updated AVRO-1327:

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

I committed this.
> Having GenericEnumSymbol implement Comparable (mimic'ing java's Enum)
> ---------------------------------------------------------------------
>                 Key: AVRO-1327
>                 URL: https://issues.apache.org/jira/browse/AVRO-1327
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.7.4
>            Reporter: Hernan Otero
>            Assignee: Doug Cutting
>             Fix For: 1.7.5
>         Attachments: AVRO-1327.patch
>   Original Estimate: 24h
>  Remaining Estimate: 24h
> It would be great if we could have GenericEnumSymbol implementing Comparable (either
using int or String rep).
> This is mainly because GenericEnumSymbol is trying to mimic the java.lang.Enum and enums
are inherently comparable that's why java.lang.Enum is Comparable. 
> Sorting Enum and GenericEnumSymbol is an action that we perform a lot. Making it Comparable
frees us from explicit type checking and improves general code clarity and performance.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message