16 #ifndef IMPALA_EXEC_OUTPUT_BUFFER_INLINE_H
17 #define IMPALA_EXEC_OUTPUT_BUFFER_INLINE_H
49 uint8_t buf[
sizeof(int32_t)];
67 return WriteBytes(length, reinterpret_cast<const char*>(buf));
88 uint8_t val = b ? 1 : 0;
int WriteZLong(int64_t val)
int WriteBytes(int length, const uint8_t *buf)
Writes bytes to the buffer, returns the number of bytes written.
static const int MAX_ZINT_LEN
Maximum lengths for Zigzag encodings.
static int PutZInt(int32_t integer, uint8_t *buf)
Put a zigzag encoded integer into a buffer and return its length.
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)
static void PutInt(uint8_t *buf, uint16_t integer)
static int64_t PutVLong(int64_t val, uint8_t *buf)
int WriteVInt(int32_t val)
int WriteZInt(int32_t val)
Writes a zig-zag encoded integer.
int WriteBoolean(bool val)
static const int MAX_ZLONG_LEN
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)
static int64_t PutVInt(int32_t val, uint8_t *buf)
static const int MAX_VINT_LEN
Maximum length for Writeable VInt.
static int PutZLong(int64_t longint, uint8_t *buf)
Put a zigzag encoded long integer into a buffer and return its length.