[ 
https://issues.apache.org/jira/browse/PARQUET-1918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Mollitor moved HIVE-24226 to PARQUET-1918:
------------------------------------------------

         Key: PARQUET-1918  (was: HIVE-24226)
    Workflow: patch-available, re-open possible  (was: no-reopen-closed, 
patch-avail)
     Project: Parquet  (was: Hive)

> Avoid Copy of Bytes in Protobuf BinaryWriter
> --------------------------------------------
>
>                 Key: PARQUET-1918
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1918
>             Project: Parquet
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>
> {code:java|title=ProtoWriteSupport.java}
>   class BinaryWriter extends FieldWriter {
>     @Override
>     final void writeRawValue(Object value) {
>       ByteString byteString = (ByteString) value;
>       Binary binary = Binary.fromConstantByteArray(byteString.toByteArray());
>       recordConsumer.addBinary(binary);
>     }
>   }
> {code}
> {{toByteArray()}} creates a copy of the buffer.  There is already support 
> with Parquet and Protobuf to pass instead a ByteBuffer which avoids the copy.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to