Class PromqlLogicalPlanBuilder
- All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeVisitor<Object>,PromqlBaseParserVisitor<Object>
- Direct Known Subclasses:
PromqlAstBuilder
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected Expressionexpression(org.antlr.v4.runtime.tree.ParseTree ctx) protected List<Expression> expressions(List<? extends org.antlr.v4.runtime.ParserRuleContext> contexts) protected LogicalPlanplan(org.antlr.v4.runtime.tree.ParseTree ctx) protected Sourcesource(org.antlr.v4.runtime.ParserRuleContext parserRuleContext) protected Sourcesource(org.antlr.v4.runtime.Token token) protected Sourcesource(org.antlr.v4.runtime.Token start, org.antlr.v4.runtime.Token stop) protected Sourcesource(org.antlr.v4.runtime.tree.ParseTree parseTree) protected Sourcesource(org.antlr.v4.runtime.tree.TerminalNode terminalNode) visit(org.antlr.v4.runtime.tree.ParseTree tree) Visit a parse tree produced by thearithmeticBinarylabeled alternative inPromqlBaseParser.expression().Visit a parse tree produced by thearithmeticUnarylabeled alternative inPromqlBaseParser.expression().Visit a parse tree produced by thedecimalLiterallabeled alternative inPromqlBaseParser.number().Visit a parse tree produced byPromqlBaseParser.duration().Visit a parse tree produced byPromqlBaseParser.evaluation().Visit a parse tree produced byPromqlBaseParser.function().Visit a parse tree produced by thehexLiterallabeled alternative inPromqlBaseParser.number().Visit a parse tree produced byPromqlBaseParser.identifier().Visit a parse tree produced by theintegerLiterallabeled alternative inPromqlBaseParser.number().Visit a parse tree produced byPromqlBaseParser.labelList().Visit a parse tree produced byPromqlBaseParser.labelName().Visit a parse tree produced by theparenthesizedlabeled alternative inPromqlBaseParser.expression().Visit a parse tree produced byPromqlBaseParser.selector().Visit a parse tree produced byPromqlBaseParser.singleStatement().Visit a parse tree produced byPromqlBaseParser.string().Visit a parse tree produced by thesubquerylabeled alternative inPromqlBaseParser.expression().Parse subquery resolution, reusing the same expression folding logic used for duration arithmetic.visitTerminal(org.antlr.v4.runtime.tree.TerminalNode node) Visit a parse tree produced byPromqlBaseParser.timeValue().Methods inherited from class org.elasticsearch.xpack.esql.parser.PromqlBaseParserBaseVisitor
visitAt, visitConstant, visitFunctionParams, visitGrouping, visitLabel, visitLabels, visitModifier, visitNonReserved, visitOffset, visitSeriesMatcher, visitValue, visitValueExpressionMethods inherited from class org.antlr.v4.runtime.tree.AbstractParseTreeVisitor
aggregateResult, defaultResult, shouldVisitNextChild, visitChildren, visitErrorNodeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.antlr.v4.runtime.tree.ParseTreeVisitor
visitChildren, visitErrorNode
-
Field Details
-
GLOBAL_EVALUATION_INTERVAL
-
-
Method Details
-
plan
-
visitSingleStatement
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced byPromqlBaseParser.singleStatement().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSingleStatementin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitSingleStatementin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSelector
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced byPromqlBaseParser.selector().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSelectorin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitSelectorin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitArithmeticUnary
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced by thearithmeticUnarylabeled alternative inPromqlBaseParser.expression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitArithmeticUnaryin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitArithmeticUnaryin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitArithmeticBinary
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced by thearithmeticBinarylabeled alternative inPromqlBaseParser.expression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitArithmeticBinaryin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitArithmeticBinaryin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitParenthesized
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced by theparenthesizedlabeled alternative inPromqlBaseParser.expression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitParenthesizedin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitParenthesizedin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFunction
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced byPromqlBaseParser.function().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitFunctionin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitFunctionin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSubquery
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced by thesubquerylabeled alternative inPromqlBaseParser.expression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSubqueryin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitSubqueryin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSubqueryResolution
Parse subquery resolution, reusing the same expression folding logic used for duration arithmetic.- Specified by:
visitSubqueryResolutionin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitSubqueryResolutionin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
expression
-
expressions
protected List<Expression> expressions(List<? extends org.antlr.v4.runtime.ParserRuleContext> contexts) -
visitLabelList
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced byPromqlBaseParser.labelList().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitLabelListin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitLabelListin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitLabelName
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced byPromqlBaseParser.labelName().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitLabelNamein interfacePromqlBaseParserVisitor<Object>- Overrides:
visitLabelNamein classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitEvaluation
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced byPromqlBaseParser.evaluation().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitEvaluationin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitEvaluationin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDuration
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced byPromqlBaseParser.duration().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDurationin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitDurationin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitTimeValue
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced byPromqlBaseParser.timeValue().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitTimeValuein interfacePromqlBaseParserVisitor<Object>- Overrides:
visitTimeValuein classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDecimalLiteral
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced by thedecimalLiterallabeled alternative inPromqlBaseParser.number().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDecimalLiteralin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitDecimalLiteralin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitIntegerLiteral
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced by theintegerLiterallabeled alternative inPromqlBaseParser.number().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitIntegerLiteralin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitIntegerLiteralin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitHexLiteral
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced by thehexLiterallabeled alternative inPromqlBaseParser.number().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitHexLiteralin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitHexLiteralin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitString
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced byPromqlBaseParser.string().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitStringin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitStringin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitIdentifier
Description copied from class:PromqlBaseParserBaseVisitorVisit a parse tree produced byPromqlBaseParser.identifier().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitIdentifierin interfacePromqlBaseParserVisitor<Object>- Overrides:
visitIdentifierin classPromqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visit
-
visitTerminal
-
source
-
source
-
source
-
source
-
source
-