Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2147

ValueVector design refactoring umbrella

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • Future
    • Execution - Data Types
    • None

    Description

      The overall design of value vectors has become unclear and inconsistent with additions from multiple contributors over the time. Also we need proper documentation for the abstractions made for consistently communicating with developers.

      There are many instances that indicate possible design issues.

      For instance, ValueVector implements Iterator<ValueVector>. This seems to assume all vectors are somewhat hierarchical. This does not truly capture scalar vectors as they have no child.

      Similarly, RepeatedVector has the following interface definition:

      RepeatedVector
      interface RepeatedVector {
        RepeatedFixedWidthVector.RepeatedAccessor getAccessor()
      }
      

      Yet, RepeatedFixedWidthVector implements RepeatedVector as follows

      RepeatedFixedWidthVector
      interface RepeatedFixedWidthVector extends ValueVector, RepeatedVector {
        interface RepeatedAccessor extends Accessor {...}
        interface RepeatedMutator extends Mutator {...}
      }
      

      A super-type that is aware of its sub-type hints a need for re-design.

      Examples could be multiplied here: some method names are not self-explaining or wrongly named or seems to be misplaced. There are couple of more places where design is not capturing the nature of vectors such like missing abstractions for Repeated vs Composite vectors. We should consider a design refactoring.

      This is an umbrella issue for tracking ValueVector design refactoring.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hgunes Hanifi Gunes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: