jackylk commented on issue #3638: [CARBONDATA-3731] Avoid data copy in Writer
URL: https://github.com/apache/carbondata/pull/3638#issuecomment-594351151
 
 
   @ajantha-bhat 
   ```
   CarbonRowDataWriterProcessorStepImpl.processBatch:
        CarbonRow converted = convertRowWithoutRearrange(row);
   
   TablePage.convertToColumnarAndAddToPages:
        byte[] valueWithLength = addShortLengthToByteArray((byte[]) 
noDictAndComplex[i]);  // alloc and copy
        noDictDimensionPages[i].putData(rowId, valueWithLength); // safe copy 
to unsafe
   
   HighCardDictDimensionIndexCodec.encodeIndexStorage:
        byte[][] data = input.getByteArrayPage();  // unsafe copy to safe
        byte[] flattened = ByteUtil.flatten(indexStorage.getDataPage());   // 
alloc and copy
   
   SnappyCompressor.compressByte:
        Snappy.rawCompress(unCompInput, unCompInput.length); // copy inside, 
shoud use rawCompress(Object input, int inputOffset, int inputLength, byte[] 
output, int outputOffset)
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to