Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-1282

NumericType: comparator for integers of fixed and arbitrary length

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 0.7 beta 1
    • Component/s: None
    • Labels:
      None

      Description

      Patch introduces a new column comparator: NumericType. It can compare signed integer values of fixed (int, long) and arbitrary length (BigInteger). Both can be mixed. Leading zero bytes or 0xFF bytes will be ignored and can safely be stripped on compaction.

      The trivial version uses "new BigInteger(byte[]).compareTo(new BigInteger(byte[]))" but it's slower and fills up memory.
      The faster version operates completely on stack and should even obsolete LongType.

        Attachments

        1. trunk-1282-v3.txt
          10 kB
          Matthew F. Dennis
        2. trunk-1282.txt
          10 kB
          Matthew F. Dennis
        3. 1282-v4.txt
          12 kB
          Jonathan Ellis
        4. 0003-system-tests.patch
          5 kB
          Folke Behrens
        5. 0002-instance-field.patch
          2 kB
          Folke Behrens
        6. 0001-1282-v4.patch
          13 kB
          Folke Behrens

          Activity

            People

            • Assignee:
              messi Folke Behrens
              Reporter:
              messi Folke Behrens
              Authors:
              Folke Behrens
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: