hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Mollitor (Jira)" <j...@apache.org>
Subject [jira] [Assigned] (HIVE-24226) Avoid Copy of Bytes in Protobuf BinaryWriter
Date Fri, 02 Oct 2020 13:58:00 GMT

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

David Mollitor reassigned HIVE-24226:
-------------------------------------


> Avoid Copy of Bytes in Protobuf BinaryWriter
> --------------------------------------------
>
>                 Key: HIVE-24226
>                 URL: https://issues.apache.org/jira/browse/HIVE-24226
>             Project: Hive
>          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)

Mime
View raw message