mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Fix
This commit is contained in:
parent
81db081b88
commit
c502a14404
@ -195,7 +195,7 @@ void ASTSystemQuery::formatImpl(const FormatSettings & settings, FormatState &,
|
||||
else if (type == Type::DROP_FILESYSTEM_CACHE)
|
||||
{
|
||||
if (!filesystem_cache_path.empty())
|
||||
settings.ostr << (settings.hilite ? hilite_none : "") << filesystem_cache_path;
|
||||
settings.ostr << (settings.hilite ? hilite_none : "") << " " << filesystem_cache_path;
|
||||
if (force_removal)
|
||||
settings.ostr << (settings.hilite ? hilite_keyword : "") << " FORCE";
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <Parsers/ParserInsertQuery.h>
|
||||
#include <Parsers/ParserSetQuery.h>
|
||||
#include <Parsers/ParserQuery.h>
|
||||
#include <Parsers/ParserSystemQuery.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
@ -62,6 +63,7 @@ bool ParserExplainQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected
|
||||
ParserCreateTableQuery create_p;
|
||||
ParserSelectWithUnionQuery select_p;
|
||||
ParserInsertQuery insert_p(end, allow_settings_after_format_in_insert);
|
||||
ParserSystemQuery system_p;
|
||||
ASTPtr query;
|
||||
if (kind == ASTExplainQuery::ExplainKind::ParsedAST)
|
||||
{
|
||||
@ -88,7 +90,8 @@ bool ParserExplainQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected
|
||||
}
|
||||
else if (select_p.parse(pos, query, expected) ||
|
||||
create_p.parse(pos, query, expected) ||
|
||||
insert_p.parse(pos, query, expected))
|
||||
insert_p.parse(pos, query, expected) ||
|
||||
system_p.parse(pos, query, expected))
|
||||
explain_query->setExplainedQuery(std::move(query));
|
||||
else
|
||||
return false;
|
||||
|
@ -28,3 +28,5 @@ SELECT count() FROM system.filesystem_cache;
|
||||
SYSTEM DROP FILESYSTEM CACHE './s3_cache/';
|
||||
SELECT count() FROM system.filesystem_cache;
|
||||
2
|
||||
EXPLAIN SYNTAX SYSTEM DROP FILESYSTEM CACHE './s3_cache/' FORCE;
|
||||
SYSTEM DROP FILESYSTEM CACHE ./s3_cache/ FORCE
|
||||
|
@ -32,3 +32,5 @@ SELECT count() FROM system.filesystem_cache;
|
||||
|
||||
SYSTEM DROP FILESYSTEM CACHE './s3_cache/';
|
||||
SELECT count() FROM system.filesystem_cache;
|
||||
|
||||
EXPLAIN SYNTAX SYSTEM DROP FILESYSTEM CACHE './s3_cache/' FORCE;
|
||||
|
Loading…
Reference in New Issue
Block a user