-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the issue that missing identifiers from ANTLR keywords #821
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,35 @@ commands | |
| fieldsummaryCommand | ||
; | ||
|
||
commandName | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a new variable |
||
: SEARCH | ||
| DESCRIBE | ||
| SHOW | ||
| AD | ||
| ML | ||
| KMEANS | ||
| WHERE | ||
| CORRELATE | ||
| JOIN | ||
| FIELDS | ||
| STATS | ||
| EVENTSTATS | ||
| DEDUP | ||
| EXPLAIN | ||
| SORT | ||
| HEAD | ||
| TOP | ||
| RARE | ||
| EVAL | ||
| GROK | ||
| PARSE | ||
| PATTERNS | ||
| LOOKUP | ||
| RENAME | ||
| FILLNULL | ||
| FIELDSUMMARY | ||
; | ||
|
||
searchCommand | ||
: (SEARCH)? fromClause # searchFrom | ||
| (SEARCH)? fromClause logicalExpression # searchFromFilter | ||
|
@@ -360,14 +389,6 @@ statsFunctionName | |
| STDDEV_POP | ||
; | ||
|
||
takeAggFunction | ||
: TAKE LT_PRTHS fieldExpression (COMMA size = integerLiteral)? RT_PRTHS | ||
; | ||
|
||
percentileAggFunction | ||
: PERCENTILE LESS value = integerLiteral GREATER LT_PRTHS aggField = fieldExpression RT_PRTHS | ||
; | ||
Comment on lines
-363
to
-369
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Never used. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kt-eliatra @salyh please make sure why this is not in use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thats not from us and in the g4 files there are plenty of unused statements. And also unused code in the code base btw :-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
// expressions | ||
expression | ||
: logicalExpression | ||
|
@@ -999,45 +1020,36 @@ keywordsCanBeId | |
| mathematicalFunctionName | ||
| positionFunctionName | ||
| cryptographicFunctionName | ||
// commands | ||
| SEARCH | ||
| DESCRIBE | ||
| SHOW | ||
| FROM | ||
| WHERE | ||
| CORRELATE | ||
| FIELDS | ||
| RENAME | ||
| STATS | ||
| DEDUP | ||
| SORT | ||
| EVAL | ||
| HEAD | ||
| TOP | ||
| RARE | ||
| PARSE | ||
| METHOD | ||
| REGEX | ||
| PUNCT | ||
| GROK | ||
| PATTERN | ||
| PATTERNS | ||
| NEW_FIELD | ||
| KMEANS | ||
| AD | ||
| ML | ||
| EXPLAIN | ||
| singleFieldRelevanceFunctionName | ||
| multiFieldRelevanceFunctionName | ||
| commandName | ||
| comparisonOperator | ||
| explainMode | ||
| correlationType | ||
// commands assist keywords | ||
| SOURCE | ||
| INDEX | ||
| DESC | ||
| DATASOURCES | ||
// CLAUSEKEYWORDS | ||
| SORTBY | ||
// FIELDKEYWORDSAUTO | ||
| AUTO | ||
| STR | ||
| IP | ||
| NUM | ||
| FROM | ||
| PATTERN | ||
| NEW_FIELD | ||
| SCOPE | ||
| MAPPING | ||
| WITH | ||
| USING | ||
| CAST | ||
| GET_FORMAT | ||
| EXTRACT | ||
| INTERVAL | ||
| PLUS | ||
| MINUS | ||
| INCLUDEFIELDS | ||
| NULLS | ||
// ARGUMENT KEYWORDS | ||
| KEEPEMPTY | ||
| CONSECUTIVE | ||
|
@@ -1060,27 +1072,21 @@ keywordsCanBeId | |
| TRAINING_DATA_SIZE | ||
| ANOMALY_SCORE_THRESHOLD | ||
// AGGREGATIONS | ||
| AVG | ||
| COUNT | ||
| statsFunctionName | ||
| DISTINCT_COUNT | ||
| PERCENTILE | ||
| PERCENTILE_APPROX | ||
| ESTDC | ||
| ESTDC_ERROR | ||
| MAX | ||
| MEAN | ||
| MEDIAN | ||
| MIN | ||
| MODE | ||
| RANGE | ||
| STDEV | ||
| STDEVP | ||
| SUM | ||
| SUMSQ | ||
| VAR_SAMP | ||
| VAR_POP | ||
| STDDEV_SAMP | ||
| STDDEV_POP | ||
| PERCENTILE | ||
| PERCENTILE_APPROX | ||
| TAKE | ||
| FIRST | ||
| LAST | ||
|
@@ -1098,10 +1104,6 @@ keywordsCanBeId | |
| SPARKLINE | ||
| C | ||
| DC | ||
// FIELD SUMMARY | ||
| FIELDSUMMARY | ||
| INCLUDEFIELDS | ||
| NULLS | ||
// JOIN TYPE | ||
| OUTER | ||
| INNER | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two keywords are not used at all in parser.