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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.4
    • 1.7.5
    • java
    • 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

        1. AVRO-1327.patch
          2 kB
          Doug Cutting

        Activity

          People

            cutting Doug Cutting
            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