Class ExpressionBuilder
- All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeVisitor<Object>,EsqlBaseParserVisitor<Object>
- Direct Known Subclasses:
LogicalPlanBuilder
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ExpressionBuilder.ParsingContextstatic final intMaximum depth for nested expressions. -
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 static StringquoteIdString(String unquotedString) protected static StringunquoteIdentifier(org.antlr.v4.runtime.tree.TerminalNode quotedNode, org.antlr.v4.runtime.tree.TerminalNode unquotedNode) protected static StringunquoteIdString(String quotedString) protected static voidvalidateClusterString(String clusterString, EsqlBaseParser.IndexPatternContext ctx) visit(org.antlr.v4.runtime.tree.ParseTree tree) Visit a parse tree produced byEsqlBaseParser.aggField().Visit a parse tree produced byEsqlBaseParser.aggFields().Visit a parse tree produced by thearithmeticBinarylabeled alternative inEsqlBaseParser.operatorExpression().Visit a parse tree produced by thearithmeticUnarylabeled alternative inEsqlBaseParser.operatorExpression().Visit a parse tree produced by thebooleanArrayLiterallabeled alternative inEsqlBaseParser.constant().Visit a parse tree produced byEsqlBaseParser.booleanValue().Visit a parse tree produced byEsqlBaseParser.clusterString().Visit a parse tree produced byEsqlBaseParser.commandNamedParameters().Visit a parse tree produced by thecomparisonlabeled alternative inEsqlBaseParser.valueExpression().Visit a parse tree produced byEsqlBaseParser.decimalValue().Visit a parse tree produced by thedereferencelabeled alternative inEsqlBaseParser.primaryExpression().Visit a parse tree produced byEsqlBaseParser.enrichWithClause().Visit a parse tree produced byEsqlBaseParser.field().Visit a parse tree produced byEsqlBaseParser.fields().Visit a parse tree produced byEsqlBaseParser.functionExpression().Visit a parse tree produced byEsqlBaseParser.functionName().Similar tovisitFields(EsqlBaseParser.FieldsContext)however avoids wrapping the expression into an Alias.Visit a parse tree produced byEsqlBaseParser.identifier().Visit a parse tree produced byEsqlBaseParser.identifierOrParameter().Visit a parse tree produced byEsqlBaseParser.indexString().Visit a parse tree produced by theinlineCastlabeled alternative inEsqlBaseParser.primaryExpression().Visit a parse tree produced by theinputDoubleParamslabeled alternative inEsqlBaseParser.doubleParameter().visitInputNamedOrPositionalDoubleParams(EsqlBaseParser.InputNamedOrPositionalDoubleParamsContext ctx) Visit a parse tree produced by theinputNamedOrPositionalDoubleParamslabeled alternative inEsqlBaseParser.doubleParameter().Visit a parse tree produced by theinputNamedOrPositionalParamlabeled alternative inEsqlBaseParser.parameter().Visit a parse tree produced by theinputParamlabeled alternative inEsqlBaseParser.parameter().Visit a parse tree produced byEsqlBaseParser.integerValue().Visit a parse tree produced by theisNulllabeled alternative inEsqlBaseParser.booleanExpression().Visit a parse tree produced by thelikeExpressionlabeled alternative inEsqlBaseParser.regexBooleanExpression().Visit a parse tree produced by thelikeListExpressionlabeled alternative inEsqlBaseParser.regexBooleanExpression().Visit a parse tree produced by thelogicalBinarylabeled alternative inEsqlBaseParser.booleanExpression().Visit a parse tree produced by thelogicalInlabeled alternative inEsqlBaseParser.booleanExpression().Visit a parse tree produced by thelogicalNotlabeled alternative inEsqlBaseParser.booleanExpression().Visit a parse tree produced byEsqlBaseParser.mapExpression().Visit a parse tree produced byEsqlBaseParser.matchBooleanExpression().Visit a parse tree produced by thenullLiterallabeled alternative inEsqlBaseParser.constant().Visit a parse tree produced by thenumericArrayLiterallabeled alternative inEsqlBaseParser.constant().Visit a parse tree produced by theoperatorExpressionDefaultlabeled alternative inEsqlBaseParser.operatorExpression().Visit a parse tree produced byEsqlBaseParser.orderExpression().Visit a parse tree produced by theparenthesizedExpressionlabeled alternative inEsqlBaseParser.primaryExpression().Visit a parse tree produced by thequalifiedIntegerLiterallabeled alternative inEsqlBaseParser.constant().Visit a parse tree produced byEsqlBaseParser.qualifiedName().visitQualifiedName(EsqlBaseParser.QualifiedNameContext ctx, UnresolvedAttribute defaultValue) Visit a parse tree produced byEsqlBaseParser.qualifiedNamePattern().protected NamedExpressionvisitQualifiedNamePattern(EsqlBaseParser.QualifiedNamePatternContext patternContext, Consumer<NamedExpression> checker) Visit a parse tree produced byEsqlBaseParser.qualifiedNamePatterns().protected List<NamedExpression> visitQualifiedNamePatterns(EsqlBaseParser.QualifiedNamePatternsContext ctx, Consumer<NamedExpression> checker) Visit a parse tree produced byEsqlBaseParser.renameClause().Visit a parse tree produced byEsqlBaseParser.rerankField().Visit a parse tree produced byEsqlBaseParser.rerankFields().Visit a parse tree produced by therlikeExpressionlabeled alternative inEsqlBaseParser.regexBooleanExpression().Visit a parse tree produced by therlikeListExpressionlabeled alternative inEsqlBaseParser.regexBooleanExpression().Visit a parse tree produced byEsqlBaseParser.selectorString().Visit a parse tree produced byEsqlBaseParser.string().Visit a parse tree produced by thestringArrayLiterallabeled alternative inEsqlBaseParser.constant().Visit a parse tree produced by thestringLiterallabeled alternative inEsqlBaseParser.constant().visitTerminal(org.antlr.v4.runtime.tree.TerminalNode node) Visit a parse tree produced by thetoDataTypelabeled alternative inEsqlBaseParser.dataType().Methods inherited from class org.elasticsearch.xpack.esql.parser.EsqlBaseParserBaseVisitor
visitBooleanDefault, visitBooleanLiteral, visitChangePointCommand, visitComparisonOperator, visitCompletionCommand, visitCompositeForkSubQuery, visitCompositeQuery, visitConstantDefault, visitDecimalLiteral, visitDissectCommand, visitDissectCommandOption, visitDissectCommandOptions, visitDropCommand, visitEnrichCommand, visitEnrichPolicyName, visitEntryExpression, visitEvalCommand, visitExplainCommand, visitForkCommand, visitForkSubQueries, visitForkSubQuery, visitForkSubQueryProcessingCommand, visitFromCommand, visitFunction, visitFuseCommand, visitGrokCommand, visitIdentifierPattern, visitIndexPattern, visitIndexPatternAndMetadataFields, visitInlinestatsCommand, visitInputParameter, visitInsistCommand, visitIntegerLiteral, visitJoinCommand, visitJoinCondition, visitJoinPredicate, visitJoinTarget, visitKeepCommand, visitLimitCommand, visitLookupCommand, visitMatchExpression, visitMetadata, visitMvExpandCommand, visitNumericValue, visitProcessingCommand, visitRegexExpression, visitRenameCommand, visitRerankCommand, visitRowCommand, visitSampleCommand, visitShowInfo, visitSingleCommandQuery, visitSingleForkSubQueryCommand, visitSingleStatement, visitSortCommand, visitSourceCommand, visitStatsCommand, visitSubqueryExpression, visitTimeSeriesCommand, visitUnquotedIndexString, visitValueExpressionDefault, visitWhereCommandMethods 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_DEPTHMaximum depth for nested expressions. Avoids StackOverflowErrors at parse time with very convoluted expressions, eg. EVAL x = sin(sin(sin(sin(sin(sin(sin(sin(sin(....sin(x)....) ANTLR parser is recursive, so the only way to prevent a StackOverflow is to detect how deep we are in the expression parsing and abort the query execution after a thresholdThis value is defined empirically, but the actual stack limit is highly dependent on the JVM and on the JIT.
A value of 500 proved to be right below the stack limit, but it still triggered some CI failures (once every ~2000 iterations). see https://github.com/elastic/elasticsearch/issues/109846 Even though we didn't manage to reproduce the problem in real conditions, we decided to reduce the max allowed depth to 400 (that is still a pretty reasonable limit for real use cases) and be more safe.
- See Also:
-
context
-
-
Method Details
-
expression
-
expressions
protected List<Expression> expressions(List<? extends org.antlr.v4.runtime.ParserRuleContext> contexts) -
visitBooleanValue
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.booleanValue().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitBooleanValuein interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitBooleanValuein classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDecimalValue
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.decimalValue().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDecimalValuein interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitDecimalValuein classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitIntegerValue
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.integerValue().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitIntegerValuein interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitIntegerValuein classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitNumericArrayLiteral
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thenumericArrayLiterallabeled alternative inEsqlBaseParser.constant().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitNumericArrayLiteralin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitNumericArrayLiteralin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitBooleanArrayLiteral
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thebooleanArrayLiterallabeled alternative inEsqlBaseParser.constant().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitBooleanArrayLiteralin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitBooleanArrayLiteralin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitStringArrayLiteral
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thestringArrayLiterallabeled alternative inEsqlBaseParser.constant().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitStringArrayLiteralin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitStringArrayLiteralin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitNullLiteral
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thenullLiterallabeled alternative inEsqlBaseParser.constant().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitNullLiteralin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitNullLiteralin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitStringLiteral
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thestringLiterallabeled alternative inEsqlBaseParser.constant().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitStringLiteralin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitStringLiteralin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitString
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.string().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitStringin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitStringin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitQualifiedName
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.qualifiedName().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitQualifiedNamein interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitQualifiedNamein classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitQualifiedName
public UnresolvedAttribute visitQualifiedName(EsqlBaseParser.QualifiedNameContext ctx, UnresolvedAttribute defaultValue) -
visitQualifiedNamePatterns
public List<NamedExpression> visitQualifiedNamePatterns(EsqlBaseParser.QualifiedNamePatternsContext ctx) Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.qualifiedNamePatterns().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitQualifiedNamePatternsin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitQualifiedNamePatternsin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitQualifiedNamePatterns
protected List<NamedExpression> visitQualifiedNamePatterns(EsqlBaseParser.QualifiedNamePatternsContext ctx, Consumer<NamedExpression> checker) -
visitQualifiedNamePattern
protected NamedExpression visitQualifiedNamePattern(EsqlBaseParser.QualifiedNamePatternContext patternContext, Consumer<NamedExpression> checker) -
visitQualifiedNamePattern
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.qualifiedNamePattern().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitQualifiedNamePatternin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitQualifiedNamePatternin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitQualifiedIntegerLiteral
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thequalifiedIntegerLiterallabeled alternative inEsqlBaseParser.constant().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitQualifiedIntegerLiteralin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitQualifiedIntegerLiteralin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitArithmeticUnary
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thearithmeticUnarylabeled alternative inEsqlBaseParser.operatorExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitArithmeticUnaryin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitArithmeticUnaryin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitArithmeticBinary
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thearithmeticBinarylabeled alternative inEsqlBaseParser.operatorExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitArithmeticBinaryin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitArithmeticBinaryin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitComparison
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thecomparisonlabeled alternative inEsqlBaseParser.valueExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitComparisonin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitComparisonin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitLogicalNot
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thelogicalNotlabeled alternative inEsqlBaseParser.booleanExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitLogicalNotin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitLogicalNotin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitParenthesizedExpression
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by theparenthesizedExpressionlabeled alternative inEsqlBaseParser.primaryExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitParenthesizedExpressionin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitParenthesizedExpressionin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitOperatorExpressionDefault
public Expression visitOperatorExpressionDefault(EsqlBaseParser.OperatorExpressionDefaultContext ctx) Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by theoperatorExpressionDefaultlabeled alternative inEsqlBaseParser.operatorExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitOperatorExpressionDefaultin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitOperatorExpressionDefaultin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDereference
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thedereferencelabeled alternative inEsqlBaseParser.primaryExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDereferencein interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitDereferencein classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFunctionExpression
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.functionExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitFunctionExpressionin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitFunctionExpressionin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFunctionName
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.functionName().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitFunctionNamein interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitFunctionNamein classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitMapExpression
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.mapExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitMapExpressionin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitMapExpressionin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCommandNamedParameters
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.commandNamedParameters().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitCommandNamedParametersin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitCommandNamedParametersin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitIdentifierOrParameter
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.identifierOrParameter().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitIdentifierOrParameterin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitIdentifierOrParameterin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitInlineCast
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by theinlineCastlabeled alternative inEsqlBaseParser.primaryExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitInlineCastin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitInlineCastin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitToDataType
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thetoDataTypelabeled alternative inEsqlBaseParser.dataType().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitToDataTypein interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitToDataTypein classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitLogicalBinary
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thelogicalBinarylabeled alternative inEsqlBaseParser.booleanExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitLogicalBinaryin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitLogicalBinaryin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitLogicalIn
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thelogicalInlabeled alternative inEsqlBaseParser.booleanExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitLogicalInin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitLogicalInin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitIsNull
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by theisNulllabeled alternative inEsqlBaseParser.booleanExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitIsNullin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitIsNullin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRlikeExpression
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by therlikeExpressionlabeled alternative inEsqlBaseParser.regexBooleanExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRlikeExpressionin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitRlikeExpressionin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitLikeExpression
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thelikeExpressionlabeled alternative inEsqlBaseParser.regexBooleanExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitLikeExpressionin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitLikeExpressionin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitLikeListExpression
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by thelikeListExpressionlabeled alternative inEsqlBaseParser.regexBooleanExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitLikeListExpressionin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitLikeListExpressionin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRlikeListExpression
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by therlikeListExpressionlabeled alternative inEsqlBaseParser.regexBooleanExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRlikeListExpressionin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitRlikeListExpressionin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitOrderExpression
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.orderExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitOrderExpressionin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitOrderExpressionin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRenameClause
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.renameClause().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRenameClausein interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitRenameClausein classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitEnrichWithClause
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.enrichWithClause().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitEnrichWithClausein interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitEnrichWithClausein classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitField
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.field().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitFieldin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitFieldin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFields
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.fields().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitFieldsin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitFieldsin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRerankField
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.rerankField().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRerankFieldin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitRerankFieldin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRerankFields
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.rerankFields().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRerankFieldsin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitRerankFieldsin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitAggField
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.aggField().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitAggFieldin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitAggFieldin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitAggFields
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.aggFields().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitAggFieldsin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitAggFieldsin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitGrouping
Similar tovisitFields(EsqlBaseParser.FieldsContext)however avoids wrapping the expression into an Alias. -
visitInputParam
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by theinputParamlabeled alternative inEsqlBaseParser.parameter().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitInputParamin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitInputParamin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitInputNamedOrPositionalParam
public Expression visitInputNamedOrPositionalParam(EsqlBaseParser.InputNamedOrPositionalParamContext ctx) Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by theinputNamedOrPositionalParamlabeled alternative inEsqlBaseParser.parameter().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitInputNamedOrPositionalParamin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitInputNamedOrPositionalParamin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitInputDoubleParams
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by theinputDoubleParamslabeled alternative inEsqlBaseParser.doubleParameter().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitInputDoubleParamsin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitInputDoubleParamsin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitInputNamedOrPositionalDoubleParams
public Expression visitInputNamedOrPositionalDoubleParams(EsqlBaseParser.InputNamedOrPositionalDoubleParamsContext ctx) Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced by theinputNamedOrPositionalDoubleParamslabeled alternative inEsqlBaseParser.doubleParameter().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitInputNamedOrPositionalDoubleParamsin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitInputNamedOrPositionalDoubleParamsin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitMatchBooleanExpression
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.matchBooleanExpression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitMatchBooleanExpressionin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitMatchBooleanExpressionin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitIdentifier
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.identifier().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitIdentifierin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitIdentifierin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
unquoteIdentifier
protected static String unquoteIdentifier(org.antlr.v4.runtime.tree.TerminalNode quotedNode, org.antlr.v4.runtime.tree.TerminalNode unquotedNode) -
unquoteIdString
-
quoteIdString
-
visitClusterString
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.clusterString().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitClusterStringin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitClusterStringin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitIndexString
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.indexString().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitIndexStringin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitIndexStringin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSelectorString
Description copied from class:EsqlBaseParserBaseVisitorVisit a parse tree produced byEsqlBaseParser.selectorString().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSelectorStringin interfaceEsqlBaseParserVisitor<Object>- Overrides:
visitSelectorStringin classEsqlBaseParserBaseVisitor<Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitIndexPattern
-
validateClusterString
protected static void validateClusterString(String clusterString, EsqlBaseParser.IndexPatternContext ctx) -
visit
-
visitTerminal
-