Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1327

Having GenericEnumSymbol implement Comparable (mimic'ing java's Enum)

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.4
    • Fix Version/s: 1.7.5
    • Component/s: java
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              cutting Doug Cutting
              Reporter:
              hernan.otero Hernan Otero
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified