mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
Perform in-place endianness transform because of padding
This commit is contained in:
parent
79cbebaf0d
commit
002c15823c
@ -190,12 +190,12 @@ public:
|
||||
/// Here we ensure that padding is zero without changing the protocol.
|
||||
/// TODO: After implementation of "versioning aggregate function state",
|
||||
/// change the serialization format.
|
||||
|
||||
Element elem;
|
||||
memset(&elem, 0, sizeof(elem));
|
||||
elem = samples[i];
|
||||
|
||||
writeBinaryLittleEndian(elem, buf);
|
||||
DB::transformEndianness<std::endian::little>(elem);
|
||||
DB::writeString(reinterpret_cast<const char*>(&elem), sizeof(elem), buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user