@Override
    public UnsafeRow copy() {
        UnsafeRow rowCopy = new UnsafeRow(numFields);
        final byte[] rowDataCopy = new byte[sizeInBytes];
        Platform.copyMemory(
                baseObject,
                baseOffset,
                rowDataCopy,
                Platform.BYTE_ARRAY_OFFSET,
                sizeInBytes
        );
        rowCopy.pointTo(rowDataCopy, Platform.BYTE_ARRAY_OFFSET, sizeInBytes);
        if (stringValues != null) {
            rowCopy.stringValues = new ArrayList<>(stringValues);
        }
        return rowCopy;
    }
Copies this row, returning a self-contained UnsafeRow that stores its data in an internal
byte array rather than referencing data stored in a data page.
indexr-query-opt/src/main/java/io/indexr/query/row/UnsafeRow.java