mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 16:50:48 +00:00
Update FunctionsVisitParam.h
This commit is contained in:
parent
16404c8e7b
commit
918d17ffeb
@ -87,12 +87,12 @@ struct ExtractBool
|
||||
|
||||
struct ExtractRaw
|
||||
{
|
||||
inline static void skipAfterQuotationIfNeed(const UInt8 ** pos, const UInt8 * end, ColumnString::Chars_t & res_data)
|
||||
inline static void skipAfterQuotationIfNeed(const UInt8 *& pos, const UInt8 * end, ColumnString::Chars_t & res_data)
|
||||
{
|
||||
if (*pos + 1 < end && *(*pos + 1) == '"')
|
||||
if (pos + 1 < end && pos[1] == '"')
|
||||
{
|
||||
res_data.push_back(**pos);
|
||||
++(*pos);
|
||||
res_data.push_back(*pos);
|
||||
++pos;
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,13 +106,21 @@ struct ExtractRaw
|
||||
expect_end.pop_back();
|
||||
else
|
||||
{
|
||||
switch(*pos)
|
||||
switch (*pos)
|
||||
{
|
||||
case '[' : expect_end.push_back(']'); break;
|
||||
case '{' : expect_end.push_back('}'); break;
|
||||
case '"' : expect_end.push_back('"'); break;
|
||||
case '\\' : skipAfterQuotationIfNeed(&pos, end, res_data); break;
|
||||
default :
|
||||
case '[':
|
||||
expect_end.push_back(']');
|
||||
break;
|
||||
case '{':
|
||||
expect_end.push_back('}');
|
||||
break;
|
||||
case '"':
|
||||
expect_end.push_back('"');
|
||||
break;
|
||||
case '\\':
|
||||
skipAfterQuotationIfNeed(pos, end, res_data);
|
||||
break;
|
||||
default:
|
||||
if (expect_end.empty() && (*pos == ',' || *pos == '}'))
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user