mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
more fixes for big endian
This commit is contained in:
parent
78771fc0ed
commit
6edf8f78cc
@ -109,7 +109,7 @@ public:
|
||||
|
||||
void serialize(ConstAggregateDataPtr __restrict place, WriteBuffer & buf, std::optional<size_t> /* version */) const override
|
||||
{
|
||||
writeBinary(this->data(place).numerator, buf);
|
||||
writeBinaryLittleEndian(this->data(place).numerator, buf);
|
||||
|
||||
if constexpr (std::is_unsigned_v<Denominator>)
|
||||
writeVarUInt(this->data(place).denominator, buf);
|
||||
@ -119,7 +119,7 @@ public:
|
||||
|
||||
void deserialize(AggregateDataPtr __restrict place, ReadBuffer & buf, std::optional<size_t> /* version */, Arena *) const override
|
||||
{
|
||||
readBinary(this->data(place).numerator, buf);
|
||||
readBinaryLittleEndian(this->data(place).numerator, buf);
|
||||
|
||||
if constexpr (std::is_unsigned_v<Denominator>)
|
||||
readVarUInt(this->data(place).denominator, buf);
|
||||
|
@ -19,7 +19,7 @@ ODBCDriver2BlockOutputFormat::ODBCDriver2BlockOutputFormat(
|
||||
|
||||
static void writeODBCString(WriteBuffer & out, const std::string & str)
|
||||
{
|
||||
writeIntBinary(Int32(str.size()), out);
|
||||
writePODBinaryLittleEndian(Int32(str.size()), out);
|
||||
out.write(str.data(), str.size());
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ void ODBCDriver2BlockOutputFormat::writeRow(const Columns & columns, size_t row_
|
||||
|
||||
if (column->isNullAt(row_idx))
|
||||
{
|
||||
writeIntBinary(Int32(-1), out);
|
||||
writePODBinaryLittleEndian(Int32(-1), out);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -72,11 +72,11 @@ void ODBCDriver2BlockOutputFormat::writePrefix()
|
||||
const size_t columns = header.columns();
|
||||
|
||||
/// Number of header rows.
|
||||
writeIntBinary(Int32(2), out);
|
||||
writePODBinaryLittleEndian(Int32(2), out);
|
||||
|
||||
/// Names of columns.
|
||||
/// Number of columns + 1 for first name column.
|
||||
writeIntBinary(Int32(columns + 1), out);
|
||||
writePODBinaryLittleEndian(Int32(columns + 1), out);
|
||||
writeODBCString(out, "name");
|
||||
for (size_t i = 0; i < columns; ++i)
|
||||
{
|
||||
@ -85,7 +85,7 @@ void ODBCDriver2BlockOutputFormat::writePrefix()
|
||||
}
|
||||
|
||||
/// Types of columns.
|
||||
writeIntBinary(Int32(columns + 1), out);
|
||||
writePODBinaryLittleEndian(Int32(columns + 1), out);
|
||||
writeODBCString(out, "type");
|
||||
for (size_t i = 0; i < columns; ++i)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user