mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
style fixed and minor optimization
This commit is contained in:
parent
465dee928c
commit
a134ab282b
@ -185,16 +185,14 @@ bool IParserColumnDeclaration<NameParser>::parseImpl(Pos & pos, ASTPtr & node, E
|
||||
}
|
||||
|
||||
Pos pos_before_specifier = pos;
|
||||
if (s_default.ignore(pos, expected) || s_materialized.ignore(pos, expected) || s_alias.ignore(pos, expected))
|
||||
if (s_default.ignore(pos, expected) || s_materialized.ignore(pos, expected) ||
|
||||
s_ephemeral.ignore(pos, expected) || s_alias.ignore(pos, expected))
|
||||
{
|
||||
default_specifier = Poco::toUpper(std::string{pos_before_specifier->begin, pos_before_specifier->end});
|
||||
|
||||
/// should be followed by an expression
|
||||
if (!expr_parser.parse(pos, default_expression, expected))
|
||||
return false;
|
||||
} else if (s_ephemeral.ignore(pos, expected)) {
|
||||
default_specifier = Poco::toUpper(std::string{pos_before_specifier->begin, pos_before_specifier->end});
|
||||
expr_parser.parse(pos, default_expression, expected);
|
||||
}
|
||||
|
||||
if (require_type && !type && !default_expression)
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
Ordinary = 1,
|
||||
Materialized = 2,
|
||||
Aliases = 4,
|
||||
Ephemeral = 8,
|
||||
Ephemeral = 8,
|
||||
|
||||
AllPhysical = Ordinary | Materialized,
|
||||
All = AllPhysical | Aliases | Ephemeral,
|
||||
|
Loading…
Reference in New Issue
Block a user