mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
dbms: doc: development [#METR-10719].
This commit is contained in:
parent
571a446aaf
commit
3b883d6b43
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user