style fixed and minor optimization

This commit is contained in:
Yakov Olkhovskiy 2022-02-09 13:51:12 +00:00
parent 465dee928c
commit a134ab282b
2 changed files with 3 additions and 5 deletions

View File

@ -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)