Fix wrong assert

This commit is contained in:
Alexey Milovidov 2023-05-06 02:19:58 +02:00
parent e43d353fba
commit e9912e2f7e

View File

@ -13,6 +13,11 @@ namespace DB
{
struct Settings;
namespace ErrorCodes
{
extern const int INCORRECT_DATA;
}
/** Aggregate function that takes arbitrary number of arbitrary arguments and does nothing.
*/
@ -69,7 +74,8 @@ public:
{
[[maybe_unused]] char symbol;
readChar(symbol, buf);
assert(symbol == '\0');
if (symbol != '\0')
throw Exception(ErrorCodes::INCORRECT_DATA, "Incorrect state of aggregate function 'nothing', it should contain exactly one zero byte.");
}
void insertResultInto(AggregateDataPtr __restrict, IColumn & to, Arena *) const override