1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-4173 This patch adds support for wide-DECIMAL INNER, OUTER, SEMI, functional JOINs

based on top of TypelessData
This commit is contained in:
Roman Nozdrin
2021-02-16 10:23:49 +00:00
parent 4ecd561878
commit bed0b7c6bc
22 changed files with 2347 additions and 228 deletions

View File

@ -170,6 +170,14 @@ ByteStream& ByteStream::operator<<(const uint8_t b)
return *this;
}
ByteStream& ByteStream::operator<<(const bool b)
{
add(b);
return *this;
}
ByteStream& ByteStream::operator<<(const int16_t d)
{
if (fBuf == 0 || (fCurInPtr - fBuf + 2U > fMaxLen + ISSOverhead))
@ -296,6 +304,14 @@ ByteStream& ByteStream::operator>>(uint8_t& b)
return *this;
}
ByteStream& ByteStream::operator>>(bool& b)
{
peek(b);
fCurOutPtr++;
return *this;
}
ByteStream& ByteStream::operator>>(int16_t& d)
{
peek(d);
@ -382,6 +398,15 @@ void ByteStream::peek(uint8_t& b) const
b = *((int8_t*)fCurOutPtr);
}
void ByteStream::peek(bool& b) const
{
if (length() < 1)
throw underflow_error("ByteStream::peek(bool): not enough data in stream to fill datatype");
b = *((bool*)fCurOutPtr);
}
void ByteStream::peek(int16_t& d) const
{
if (length() < 2)

View File

@ -113,6 +113,7 @@ public:
* push a uint8_t onto the end of the stream
*/
EXPORT ByteStream& operator<<(const uint8_t b);
EXPORT ByteStream& operator<<(const bool b);
/**
* push a int16_t onto the end of the stream. The byte order is whatever the native byte order is.
*/
@ -195,6 +196,7 @@ public:
* extract a uint8_t from the front of the stream.
*/
EXPORT ByteStream& operator>>(uint8_t& b);
EXPORT ByteStream& operator>>(bool& b);
/**
* extract a int16_t from the front of the stream. The byte order is whatever the native byte order is.
*/
@ -273,6 +275,7 @@ public:
* Peek at a uint8_t from the front of the stream.
*/
EXPORT void peek(uint8_t& b) const;
EXPORT void peek(bool& b) const;
/**
* Peek at a int16_t from the front of the stream. The byte order is whatever the native byte order is.
*/