Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-933 Enhance Local index support
  3. PHOENIX-1060

Replace ReferencingColumn with ColumnReference

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.4.0
    • None
    • None

    Description

      We currently have two separate classes that represent a column family/column qualifier combo: ColumnReference and ReferencingColumn. I believe the only difference is that ReferencingColumn allows a backing byte array to be used with an offset and length. Since ColumnReference already has an ImmutableBytesPtr we can add a constructor that takes two offsets and lengths for the family and qualifier and do a bit of minor refactoring (removing the family and qualifier member variables and just use the familyPtr and qualifierPtr ones exclusivly) so that we don't have two classes for the same thing:

      public class ColumnReference implements Comparable<ColumnReference> {
          
        public ColumnReference(byte[] family, int familyOffset, int familyLength, byte[] qualifier, int qualifierOffset, int qualiferLength) {
          this.familyPtr = new ImmutableBytesPtr(family, familyOffset, familyLength);
          this.qualifierPtr = new ImmutableBytesPtr(qualifier, qualifierOffset, qualifierLength);
          this.hashCode = calcHashCode(familyPtr.get(), qualifierPtr.get());
        }
      

      Another useful addition would be to implement Writable so we don't duplicate the serialization logic.

      Attachments

        1. PHOENIX-1060.patch
          16 kB
          Rajeshbabu Chintaguntla
        2. PHOENIX-1060_v3.patch
          19 kB
          Rajeshbabu Chintaguntla
        3. PHOENIX-1060_v2.patch
          19 kB
          Rajeshbabu Chintaguntla
        4. PHOENIX-1060_4.0.patch
          19 kB
          Rajeshbabu Chintaguntla

        Issue Links

          Activity

            People

              rajeshbabu Rajeshbabu Chintaguntla
              rajesh23 rajeshbabu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: