public boolean replace(long index, T value) {
    Object[] segment = array[segment(index)];

    boolean existed = segment[offset(index)] != null;
    segment[offset(index)] = value;

    return existed;
  }
Replaces the element of this big array at specified index.

@param index a position in this big array.
@return true if the previous value was not null
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/aggregation/grouped/array/ObjectBigArray.java