diff --git a/src/Parsers/New/AST/TableExpr.cpp b/src/Parsers/New/AST/TableExpr.cpp index 63768e16f53..e14493c6bd6 100644 --- a/src/Parsers/New/AST/TableExpr.cpp +++ b/src/Parsers/New/AST/TableExpr.cpp @@ -149,7 +149,7 @@ antlrcpp::Any ParseTreeVisitor::visitTableArgExpr(ClickHouseParser::TableArgExpr { if (ctx->literal()) return std::make_shared(visit(ctx->literal()).as>()); if (ctx->tableFunctionExpr()) return std::make_shared(visit(ctx->tableFunctionExpr()).as>()); - if (ctx->identifier()) return std::make_shared(visit(ctx->identifier()).as>()); + if (ctx->nestedIdentifier()) return std::make_shared(visit(ctx->nestedIdentifier()).as>()); __builtin_unreachable(); } diff --git a/src/Parsers/New/ClickHouseParser.cpp b/src/Parsers/New/ClickHouseParser.cpp index 1be89f63a86..174f838f19d 100644 --- a/src/Parsers/New/ClickHouseParser.cpp +++ b/src/Parsers/New/ClickHouseParser.cpp @@ -16430,8 +16430,8 @@ ClickHouseParser::TableArgExprContext::TableArgExprContext(ParserRuleContext *pa : ParserRuleContext(parent, invokingState) { } -ClickHouseParser::IdentifierContext* ClickHouseParser::TableArgExprContext::identifier() { - return getRuleContext(0); +ClickHouseParser::NestedIdentifierContext* ClickHouseParser::TableArgExprContext::nestedIdentifier() { + return getRuleContext(0); } ClickHouseParser::TableFunctionExprContext* ClickHouseParser::TableArgExprContext::tableFunctionExpr() { @@ -16468,7 +16468,7 @@ ClickHouseParser::TableArgExprContext* ClickHouseParser::tableArgExpr() { case 1: { enterOuterAlt(_localctx, 1); setState(1859); - identifier(); + nestedIdentifier(); break; } @@ -20142,7 +20142,7 @@ ClickHouseParser::Initializer::Initializer() { 0x2, 0x73f, 0x741, 0x5, 0xc4, 0x63, 0x2, 0x740, 0x73e, 0x3, 0x2, 0x2, 0x2, 0x741, 0x744, 0x3, 0x2, 0x2, 0x2, 0x742, 0x740, 0x3, 0x2, 0x2, 0x2, 0x742, 0x743, 0x3, 0x2, 0x2, 0x2, 0x743, 0xc3, 0x3, 0x2, 0x2, 0x2, - 0x744, 0x742, 0x3, 0x2, 0x2, 0x2, 0x745, 0x749, 0x5, 0xd6, 0x6c, 0x2, + 0x744, 0x742, 0x3, 0x2, 0x2, 0x2, 0x745, 0x749, 0x5, 0xba, 0x5e, 0x2, 0x746, 0x749, 0x5, 0xbe, 0x60, 0x2, 0x747, 0x749, 0x5, 0xcc, 0x67, 0x2, 0x748, 0x745, 0x3, 0x2, 0x2, 0x2, 0x748, 0x746, 0x3, 0x2, 0x2, 0x2, 0x748, 0x747, 0x3, 0x2, 0x2, 0x2, 0x749, 0xc5, 0x3, 0x2, 0x2, 0x2, 0x74a, diff --git a/src/Parsers/New/ClickHouseParser.g4 b/src/Parsers/New/ClickHouseParser.g4 index 5cab874e329..28e5b1217ab 100644 --- a/src/Parsers/New/ClickHouseParser.g4 +++ b/src/Parsers/New/ClickHouseParser.g4 @@ -428,7 +428,7 @@ tableFunctionExpr: identifier LPAREN tableArgList? RPAREN; tableIdentifier: (databaseIdentifier DOT)? identifier; tableArgList: tableArgExpr (COMMA tableArgExpr)*; tableArgExpr - : identifier + : nestedIdentifier | tableFunctionExpr | literal ; diff --git a/src/Parsers/New/ClickHouseParser.h b/src/Parsers/New/ClickHouseParser.h index 8754559dcc2..c860932ba1c 100644 --- a/src/Parsers/New/ClickHouseParser.h +++ b/src/Parsers/New/ClickHouseParser.h @@ -3064,7 +3064,7 @@ public: public: TableArgExprContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - IdentifierContext *identifier(); + NestedIdentifierContext *nestedIdentifier(); TableFunctionExprContext *tableFunctionExpr(); LiteralContext *literal();