Class PromqlAstBuilder
- All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeVisitor<Object>,PromqlBaseParserVisitor<Object>
-
Field Summary
FieldsFields inherited from class org.elasticsearch.xpack.esql.parser.promql.PromqlLogicalPlanBuilder
GLOBAL_EVALUATION_INTERVAL -
Constructor Summary
ConstructorsConstructorDescriptionPromqlAstBuilder(Literal start, Literal end, int startLine, int startColumn) -
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) plan(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 thedecimalLiterallabeled alternative inPromqlBaseParser.number().Visit a parse tree produced byPromqlBaseParser.duration().Visit a parse tree produced byPromqlBaseParser.evaluation().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 byPromqlBaseParser.string().visitTerminal(org.antlr.v4.runtime.tree.TerminalNode node) Visit a parse tree produced byPromqlBaseParser.timeValue().Methods inherited from class org.elasticsearch.xpack.esql.parser.promql.PromqlLogicalPlanBuilder
visitArithmeticBinary, visitArithmeticUnary, visitFunction, visitParenthesized, visitSelector, visitSingleStatement, visitSubquery, visitSubqueryResolutionMethods 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
-
MAX_EXPRESSION_DEPTH
public static final int MAX_EXPRESSION_DEPTH- See Also:
-
-
Constructor Details
-
PromqlAstBuilder
-
-
Method Details
-
plan
- Overrides:
planin classPromqlLogicalPlanBuilder
-
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
-