Skip to content

Commit

Permalink
add more check + line break
Browse files Browse the repository at this point in the history
  • Loading branch information
canhld94 committed Jul 5, 2023
1 parent 1a0b2d0 commit 8f1ed5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Storages/checkAndGetLiteralArgument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ namespace ErrorCodes
template <typename T>
T checkAndGetLiteralArgument(const ASTPtr & arg, const String & arg_name)
{
if (arg->as<ASTLiteral>())
if (arg && arg->as<ASTLiteral>())
return checkAndGetLiteralArgument<T>(*arg->as<ASTLiteral>(), arg_name);

throw Exception(
ErrorCodes::BAD_ARGUMENTS,
"Argument '{}' must be a literal, get {} (value: {})",
arg_name,
arg->getID(),
arg->formatForErrorMessage());
arg ? arg->getID() : "NULL",
arg ? arg->formatForErrorMessage() : "NULL");
}

template <typename T>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CREATE TABLE dict (`k` String, `v` String) ENGINE = EmbeddedRocksDB(k) PRIMARY KEY k; -- {serverError 36}
CREATE TABLE dict (`k` String, `v` String) ENGINE = EmbeddedRocksDB(k) PRIMARY KEY k; -- {serverError 36}

0 comments on commit 8f1ed5c

Please sign in to comment.