mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 01:00:48 +00:00
Fix TSVRaw on long text
This commit is contained in:
parent
e284bf83d0
commit
3683891ebc
@ -33,13 +33,25 @@ public:
|
|||||||
|
|
||||||
bool readField(IColumn & column, const DataTypePtr & type, bool) override
|
bool readField(IColumn & column, const DataTypePtr & type, bool) override
|
||||||
{
|
{
|
||||||
char * pos = find_first_symbols<'\n', '\t'>(in.position(), in.buffer().end());
|
String tmp;
|
||||||
ReadBufferFromMemory cell(in.position(), pos - in.position());
|
|
||||||
|
while (!in.eof())
|
||||||
|
{
|
||||||
|
char * pos = find_first_symbols<'\n', '\t'>(in.position(), in.buffer().end());
|
||||||
|
|
||||||
|
tmp.append(in.position(), pos - in.position());
|
||||||
|
in.position() = pos;
|
||||||
|
|
||||||
|
if (pos == in.buffer().end())
|
||||||
|
in.next();
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReadBufferFromString cell(tmp);
|
||||||
|
|
||||||
type->deserializeAsWholeText(column, cell, format_settings);
|
type->deserializeAsWholeText(column, cell, format_settings);
|
||||||
|
|
||||||
in.position() = pos;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user