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

setValueCount of VariableLengthVectors throws IOB exception when called with 0 value after clearing vectors

    Details

      Description

      For VariableLengthVectors when we call setValueCount explicitly after clearing off the vector memory then it throws IOB exception. Normally setValueCount is not required to be called explicitly after clear, since getValueCount will return correct information. But if called it currently throws IOB which should not be the case.

      The reason being when clear is called then it releases both offsetVector and dataVector memory(or DrillByteBuf). Later when setValueCount is called then it tries to get current value in offset vector at that valueCount index and fails since the length of offset vector is zero. Reference to code.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shamirwasia Sorabh Hamirwasia
                Reporter:
                shamirwasia Sorabh Hamirwasia
                Reviewer:
                Parth Chandra
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: