Skip to content

Commit

Permalink
update iplocation antlr
Browse files Browse the repository at this point in the history
Signed-off-by: YANGDB <[email protected]>
  • Loading branch information
YANG-DB committed Nov 1, 2024
1 parent 4439f06 commit 8f3405b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ppl-spark-integration/src/main/antlr4/OpenSearchPPLParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ commandName
| FILLNULL
| FIELDSUMMARY
| TRENDLINE
| GEOIP
;

searchCommand
Expand Down Expand Up @@ -449,6 +448,7 @@ valueExpression
| positionFunction # positionFunctionCall
| caseFunction # caseExpr
| timestampFunction # timestampFunctionCall
| geoipFunction # geoFunctionCall
| LT_PRTHS valueExpression RT_PRTHS # parentheticValueExpr
| LT_SQR_PRTHS subSearch RT_SQR_PRTHS # scalarSubqueryExpr
;
Expand All @@ -457,7 +457,6 @@ primaryExpression
: evalFunctionCall
| fieldExpression
| literalValue
| geoipFunctionCall
;

positionFunction
Expand Down Expand Up @@ -545,7 +544,7 @@ dataTypeFunctionCall
;

// geoip function
geoipFunctionCall
geoipFunction
: GEOIP LT_PRTHS (datasource = functionArg COMMA)? ipAddress = functionArg (COMMA properties = stringLiteral)? RT_PRTHS
;

Expand Down Expand Up @@ -582,6 +581,7 @@ evalFunctionName
| cryptographicFunctionName
| jsonFunctionName
| collectionFunctionName
| geoipFunctionName
;

functionArgs
Expand Down Expand Up @@ -889,6 +889,10 @@ collectionFunctionName
: ARRAY
;

geoipFunctionName
: GEOIP
;

positionFunctionName
: POSITION
;
Expand Down

0 comments on commit 8f3405b

Please sign in to comment.