Fix conflicts

This commit is contained in:
Kruglov Pavel 2024-01-08 16:50:17 +01:00 committed by GitHub
parent b947609b8e
commit 3de5b27c48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -381,7 +381,7 @@ void SerializationString::deserializeTextJSON(IColumn & column, ReadBuffer & ist
str_value = "false";
}
read(column, [&](ColumnString::Chars & data) { data.insert(str_value.begin(), str_value.end()); });
read<void>(column, [&](ColumnString::Chars & data) { data.insert(str_value.begin(), str_value.end()); });
}
else if (settings.json.read_numbers_as_strings && !istr.eof() && *istr.position() != '"')
{
@ -406,6 +406,26 @@ bool SerializationString::tryDeserializeTextJSON(IColumn & column, ReadBuffer &
if (settings.json.read_arrays_as_strings && !istr.eof() && *istr.position() == '[')
return read<bool>(column, [&](ColumnString::Chars & data) { return readJSONArrayInto<ColumnString::Chars, bool>(data, istr); });
if (settings.json.read_bools_as_strings && !istr.eof() && (*istr.position() == 't' || *istr.position() == 'f'))
{
String str_value;
if (*istr.position() == 't')
{
if (!checkString("true", istr))
return false;
str_value = "true";
}
else if (*istr.position() == 'f')
{
if (!checkString("false", istr))
return false;
str_value = "false";
}
read<void>(column, [&](ColumnString::Chars & data) { data.insert(str_value.begin(), str_value.end()); });
return true;
}
if (settings.json.read_numbers_as_strings && !istr.eof() && *istr.position() != '"')
{
String field;