16 #ifndef IMPALA_EXEC_WRITE_STREAM_H
17 #define IMPALA_EXEC_WRITE_STREAM_H
19 #include <boost/cstdint.hpp>
35 inline int WriteBytes(
int length,
const uint8_t* buf);
36 inline int WriteBytes(
int length,
const char* buf);
48 inline int WriteText(int32_t len,
const uint8_t* buf);
56 inline std::string
String();
int WriteZLong(int64_t val)
int WriteBytes(int length, const uint8_t *buf)
Writes bytes to the buffer, returns the number of bytes written.
std::stringstream buffer_
TODO consider making this like the parquet writer to avoid extra copy.
int WriteEmptyText()
Writes an empty string to the buffer (encoded as 1 byte)
int WriteInt(uint32_t val)
int WriteVInt(int32_t val)
int WriteZInt(int32_t val)
Writes a zig-zag encoded integer.
int WriteBoolean(bool val)
int WriteByte(uint8_t val)
int WriteText(int32_t len, const uint8_t *buf)
Writes the length as a VLong follows by the byte string.
std::string String()
returns the contents of this stream as a string
int WriteVLong(int64_t val)