Revert "Fix error code"

This reverts commit ca4fa430b3.
This commit is contained in:
Amos Bird 2023-10-27 23:46:43 +08:00
parent ca4fa430b3
commit 3eca59d62d
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4

View File

@ -1400,7 +1400,9 @@ const Block & Context::getScalar(const String & name) const
auto it = scalars.find(name);
if (scalars.end() == it)
{
throw Exception(ErrorCodes::LOGICAL_ERROR, "Scalar {} doesn't exist (internal bug)", backQuoteIfNeed(name));
// This should be a logical error, but it fails the sql_fuzz test too
// often, so 'bad arguments' for now.
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Scalar {} doesn't exist (internal bug)", backQuoteIfNeed(name));
}
return it->second;
}