mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 05:22:17 +00:00
dbms: development.
This commit is contained in:
parent
f409cf1540
commit
1677287005
@ -77,13 +77,13 @@ void DataTypeString::deserializeBinary(IColumn & column, ReadBuffer & istr, size
|
|||||||
UInt64 size;
|
UInt64 size;
|
||||||
readVarUInt(size, istr);
|
readVarUInt(size, istr);
|
||||||
|
|
||||||
offset += size;
|
offset += size + 1;
|
||||||
offsets.push_back(offset);
|
offsets.push_back(offset);
|
||||||
|
|
||||||
if (data.size() < offset)
|
if (data.size() < offset)
|
||||||
data.resize(offset);
|
data.resize(offset);
|
||||||
|
|
||||||
istr.readStrict(reinterpret_cast<char*>(&data[offset - size]), sizeof(ColumnUInt8::value_type) * size);
|
istr.readStrict(reinterpret_cast<char*>(&data[offset - size - 1]), sizeof(ColumnUInt8::value_type) * size);
|
||||||
data[offset - 1] = 0;
|
data[offset - 1] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,13 +124,14 @@ int main(int argc, char ** argv)
|
|||||||
/// читаем из неё
|
/// читаем из неё
|
||||||
if (argc == 2 && 0 == strcmp(argv[1], "read"))
|
if (argc == 2 && 0 == strcmp(argv[1], "read"))
|
||||||
{
|
{
|
||||||
/* DB::ColumnNames column_names;
|
/*
|
||||||
|
DB::ColumnNames column_names;
|
||||||
boost::assign::push_back(column_names)
|
boost::assign::push_back(column_names)
|
||||||
("SearchPhrase");
|
("UniqID");
|
||||||
|
|
||||||
SharedPtr<DB::DataTypes> data_types = new DB::DataTypes;
|
SharedPtr<DB::DataTypes> data_types = new DB::DataTypes;
|
||||||
boost::assign::push_back(*data_types)
|
boost::assign::push_back(*data_types)
|
||||||
(new DB::DataTypeString);
|
(new DB::DataTypeUInt64);
|
||||||
*/
|
*/
|
||||||
DB::WriteBufferFromOStream out_buf(std::cout);
|
DB::WriteBufferFromOStream out_buf(std::cout);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user