private void allocateNewSegment() {
    short[] newSegment = new short[SEGMENT_SIZE];
    if (initialValue != 0) {
      Arrays.fill(newSegment, initialValue);
    }
    array[segments] = newSegment;
    capacity += SEGMENT_SIZE;
    segments++;
  }
Copies this array, beginning at the specified sourceIndex, to the specified destinationIndex of
the destination array. A subsequence of this array's components are copied to the destination
array referenced by {@code destination}. The number of components copied is equal to the {@code
length} argument. The components at positions {@code sourceIndex} through {@code
sourceIndex+length-1} in this array are copied into positions {@code destinationIndex} through
{@code destinationIndex+length-1}, respectively, of the destination array.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/aggregation/grouped/array/ShortBigArray.java