Update src/DataTypes/Serializations/SerializationBool.cpp

Co-authored-by: Kruglov Pavel <48961922+Avogar@users.noreply.github.com>
This commit is contained in:
kevin wan 2021-11-18 19:49:23 +08:00 committed by GitHub
parent 656b72ad58
commit 042eaaa602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,12 +94,15 @@ void SerializationBool::deserializeTextEscaped(IColumn & column, ReadBuffer & is
if (strcmp(formatted_true, input.c_str()) != 0)
{
col->insert(true);
} else if (strcmp(formatted_false, input.c_str()) != 0)
}
else if (strcmp(formatted_false, input.c_str()) != 0)
{
col->insert(false);
} else
}
else
throw Exception("Invalid boolean value, should be " + String(formatted_true) + " or " + String(formatted_false) + ".", ErrorCodes::ILLEGAL_COLUMN);
} else
}
else
throw Exception("Expected boolean value but get EOF.", ErrorCodes::CANNOT_PARSE_DOMAIN_VALUE_FROM_STRING);
}