@ 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 ) ; 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 .