You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-641 This commit introduces GTest Suite into CS.
Binary NULL magic now consists of a series of BINARYEMPTYROW-s + BINARYNULL in the end. ByteStream now has hexbyte alias. Added ColumnCommand::getEmptyRowValue to support 16 byte EMPTY values.
This commit is contained in:
@ -236,12 +236,12 @@ ByteStream& ByteStream::operator<<(const uint64_t o)
|
||||
}
|
||||
|
||||
// WIP MCOL-641
|
||||
ByteStream& ByteStream::operator<<(const unsigned __int128 o)
|
||||
ByteStream& ByteStream::operator<<(const uint128_t o)
|
||||
{
|
||||
if (fBuf == 0 || (fCurInPtr - fBuf + 16U > fMaxLen + ISSOverhead))
|
||||
growBuf(fMaxLen + BlockSize);
|
||||
|
||||
*((unsigned __int128*) fCurInPtr) = o;
|
||||
*((uint128_t*) fCurInPtr) = o;
|
||||
fCurInPtr += 16;
|
||||
|
||||
return *this;
|
||||
@ -332,7 +332,7 @@ ByteStream& ByteStream::operator>>(uint64_t& o)
|
||||
}
|
||||
|
||||
// WIP MCOL-641
|
||||
ByteStream& ByteStream::operator>>(unsigned __int128& o)
|
||||
ByteStream& ByteStream::operator>>(uint128_t& o)
|
||||
{
|
||||
peek(o);
|
||||
fCurOutPtr += 16;
|
||||
@ -420,13 +420,13 @@ void ByteStream::peek(uint64_t& o) const
|
||||
}
|
||||
|
||||
// WIP MCOL-641
|
||||
void ByteStream::peek(unsigned __int128& o) const
|
||||
void ByteStream::peek(uint128_t& o) const
|
||||
{
|
||||
|
||||
if (length() < 16)
|
||||
throw underflow_error("ByteStream>unsigned __int128: not enough data in stream to fill datatype");
|
||||
throw underflow_error("ByteStream>uint128_t: not enough data in stream to fill datatype");
|
||||
|
||||
o = *((unsigned __int128*) fCurOutPtr);
|
||||
o = *((uint128_t*) fCurOutPtr);
|
||||
}
|
||||
|
||||
void ByteStream::peek(string& s) const
|
||||
|
@ -45,6 +45,8 @@ class ByteStreamTestSuite;
|
||||
#define EXPORT
|
||||
#endif
|
||||
|
||||
using uint128_t = unsigned __int128;
|
||||
|
||||
namespace messageqcpp
|
||||
{
|
||||
|
||||
@ -74,6 +76,7 @@ public:
|
||||
typedef uint16_t doublebyte;
|
||||
typedef uint32_t quadbyte;
|
||||
typedef uint64_t octbyte;
|
||||
typedef uint128_t hexbyte;
|
||||
typedef boost::uuids::uuid uuid;
|
||||
|
||||
/**
|
||||
@ -147,7 +150,7 @@ public:
|
||||
/**
|
||||
* push an unsigned __int128 onto the end of the stream. The byte order is whatever the native byte order is.
|
||||
*/
|
||||
EXPORT ByteStream& operator<<(const unsigned __int128 o);
|
||||
EXPORT ByteStream& operator<<(const uint128_t o);
|
||||
/**
|
||||
* push a float onto the end of the stream. The byte order is
|
||||
* whatever the native byte order is.
|
||||
@ -216,7 +219,7 @@ public:
|
||||
/**
|
||||
* extract an unsigned __int128 from the front of the stream. The byte order is whatever the native byte order is.
|
||||
*/
|
||||
EXPORT ByteStream& operator>>(unsigned __int128& o);
|
||||
EXPORT ByteStream& operator>>(uint128_t& o);
|
||||
/**
|
||||
* extract a float from the front of the stream. The byte
|
||||
* order is whatever the native byte order is.
|
||||
@ -291,7 +294,7 @@ public:
|
||||
/**
|
||||
* Peek at an unsigned __int128 from the front of the stream. The byte order is whatever the native byte order is.
|
||||
*/
|
||||
EXPORT void peek(unsigned __int128& o) const;
|
||||
EXPORT void peek(uint128_t& o) const;
|
||||
/**
|
||||
* Peek at a float from the front of the stream. The byte order
|
||||
* is whatever the native byte order is.
|
||||
|
Reference in New Issue
Block a user