public void copyFrom(UnsafeRow row) {
        // copyFrom is only available for UnsafeRow created from byte array.
        assert (baseObject instanceof byte[]) && baseOffset == Platform.BYTE_ARRAY_OFFSET;
        if (row.sizeInBytes > this.sizeInBytes) {
            // resize the underlying byte[] if it's not large enough.
            this.baseObject = new byte[row.sizeInBytes];
        }
        Platform.copyMemory(
                row.baseObject, row.baseOffset, this.baseObject, this.baseOffset, row.sizeInBytes);
        // update the sizeInBytes.
        this.sizeInBytes = row.sizeInBytes;
    }
Copies the input UnsafeRow to this UnsafeRow, and resize the underlying byte[] when the
input row is larger than this row.
indexr-query-opt/src/main/java/io/indexr/query/row/UnsafeRow.java