mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
fix
fix typo
This commit is contained in:
parent
b25850a665
commit
0024a08ace
@ -41,6 +41,7 @@ bool ParserInsertQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
||||
ParserKeyword s_with("WITH");
|
||||
ParserToken s_lparen(TokenType::OpeningRoundBracket);
|
||||
ParserToken s_rparen(TokenType::ClosingRoundBracket);
|
||||
ParserToken s_semicolon(TokenType::Semicolon);
|
||||
ParserIdentifier name_p(true);
|
||||
ParserList columns_p(std::make_unique<ParserInsertElement>(), std::make_unique<ParserToken>(TokenType::Comma), false);
|
||||
ParserFunction table_function_p{false};
|
||||
@ -146,7 +147,9 @@ bool ParserInsertQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
||||
/// After FROM INFILE we expect FORMAT, SELECT, WITH or nothing.
|
||||
if (!infile && s_values.ignore(pos, expected))
|
||||
{
|
||||
/// If VALUES is defined in query, everything except setting will be parsed as data
|
||||
/// If VALUES is defined in query, everything except setting will be parsed as data,
|
||||
/// and if values followed by semicolon, the data should be null.
|
||||
if (!s_semicolon.checkWithoutMoving(pos, expected))
|
||||
data = pos->begin;
|
||||
format_str = "Values";
|
||||
}
|
||||
|
@ -956,7 +956,13 @@ namespace
|
||||
if (!insert_query)
|
||||
throw Exception("Query requires data to insert, but it is not an INSERT query", ErrorCodes::NO_DATA_TO_INSERT);
|
||||
else
|
||||
{
|
||||
const auto & settings = query_context->getSettingsRef();
|
||||
if (settings.throw_if_no_data_to_insert)
|
||||
throw Exception("No data to insert", ErrorCodes::NO_DATA_TO_INSERT);
|
||||
else
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// This is significant, because parallel parsing may be used.
|
||||
|
Loading…
Reference in New Issue
Block a user