提交 3b883d6b 编写于 作者: A Alexey Milovidov

dbms: doc: development [#METR-10719].

上级 571a446a
......@@ -7,8 +7,9 @@ namespace DB
{
/** Запрос типа такого:
* ALTER TABLE [db.]name
* [ADD COLUMN col_type [AFTER col_after],]
* [ADD COLUMN col_name type [AFTER col_after],]
* [DROP COLUMN col_drop, ...]
* [MODIFY COLUMN col_modify type, ...]
*/
class ParserAlterQuery : public IParserBase
{
......
......@@ -85,6 +85,9 @@ protected:
*
* Или:
* CREATE|ATTACH DATABASE db
*
* Или:
* CREATE|ATTACH [MATERIALIZED] VIEW [IF NOT EXISTS] [db.]name [ENGINE = engine] [POPULATE] AS SELECT ...
*/
class ParserCreateQuery : public IParserBase
{
......
......@@ -335,7 +335,9 @@ bool ParserCreateQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, const char
engine_p.parse(pos, end, storage, expected);
}
}
} else {
}
else
{
/// VIEW or MATERIALIZED VIEW
if (s_materialized.ignore(pos, end, expected) && ws.ignore(pos, end, expected))
is_materialized_view = true;
......@@ -366,19 +368,6 @@ bool ParserCreateQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, const char
ws.ignore(pos, end);
}
if (s_lparen.ignore(pos, end, expected))
{
ws.ignore(pos, end);
if (!columns_p.parse(pos, end, columns, expected))
return false;
ws.ignore(pos, end);
if (!s_rparen.ignore(pos, end, expected))
return false;
}
/// Опционально - может быть указана внутренняя ENGINE для MATERIALIZED VIEW
engine_p.parse(pos, end, inner_storage, expected);
......
......@@ -515,7 +515,7 @@ void MergeTreeData::prepareAlterModify(const ASTAlterQuery::Parameters & params)
try
{
while(Block b = in.read())
while (Block b = in.read())
out.write(b);
in.readSuffix();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册