mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 17:02:25 +00:00
dbms: development
This commit is contained in:
parent
6951a0b7c1
commit
9e053a93f3
@ -25,14 +25,14 @@ Row TabSeparatedRowInputStream::read()
|
||||
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
{
|
||||
(*data_types)[i]->deserializeTextEscaped(res[i], istr);
|
||||
|
||||
if (i == 0 && istr.eof())
|
||||
{
|
||||
res.clear();
|
||||
return res;
|
||||
}
|
||||
|
||||
(*data_types)[i]->deserializeTextEscaped(res[i], istr);
|
||||
|
||||
/// пропускаем разделители
|
||||
if (i + 1 == size)
|
||||
{
|
||||
|
@ -29,8 +29,6 @@ void DataTypeString::deserializeBinary(Field & field, ReadBuffer & istr) const
|
||||
{
|
||||
UInt64 size;
|
||||
readVarUInt(size, istr);
|
||||
if (istr.eof())
|
||||
return;
|
||||
field = String("");
|
||||
String & s = boost::get<String>(field);
|
||||
s.resize(size);
|
||||
@ -73,12 +71,12 @@ void DataTypeString::deserializeBinary(IColumn & column, ReadBuffer & istr, size
|
||||
size_t offset = 0;
|
||||
for (size_t i = 0; i < limit; ++i)
|
||||
{
|
||||
UInt64 size;
|
||||
readVarUInt(size, istr);
|
||||
|
||||
if (istr.eof())
|
||||
break;
|
||||
|
||||
UInt64 size;
|
||||
readVarUInt(size, istr);
|
||||
|
||||
offset += size;
|
||||
offsets.push_back(offset);
|
||||
|
||||
@ -86,9 +84,6 @@ void DataTypeString::deserializeBinary(IColumn & column, ReadBuffer & istr, size
|
||||
data.resize(offset);
|
||||
|
||||
istr.read(reinterpret_cast<char*>(&data[offset - size]), sizeof(ColumnUInt8::value_type) * size);
|
||||
|
||||
if (istr.eof())
|
||||
throw Exception("Cannot read all data from ReadBuffer", ErrorCodes::CANNOT_READ_DATA_FROM_READ_BUFFER);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user