Skip to content

Conversation

@LantaoJin
Copy link
Member

@LantaoJin LantaoJin commented Mar 31, 2025

Description

  1. Fix incorrect reserved words.
  2. Fix lowercase antlr4 parser issue. (mentioned in [BUG] Issues in PPL grammar #3391)

Related Issues

Resolves #3491

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Lantao Jin <ltjin@amazon.com>
@LantaoJin
Copy link
Member Author

cc @noCharger @penghuo @dai-chen

Signed-off-by: Lantao Jin <ltjin@amazon.com>
@LantaoJin
Copy link
Member Author

CI failure related to opensearch-project/job-scheduler#757

Comment on lines -1051 to -1054
| EARLIEST
| EARLIEST_TIME
| LATEST
| LATEST_TIME
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those keywords are not present in lexer.g4, another words, they are invalid here.

Comment on lines +998 to +1000
| VARIABLE_COUNT_THRESHOLD
| FREQUENCY_THRESHOLD_PERCENTAGE
| WITH
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

@LantaoJin LantaoJin Apr 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just confirming, do we need these in https://github.com/opensearch-project/opensearch-spark/blob/main/ppl-spark-integration/src/main/antlr4/OpenSearchPPLParser.g4 as well?

No for first two. WITH has already be presented in ppl-spark.

@LantaoJin LantaoJin merged commit d9ef4fa into opensearch-project:main Apr 7, 2025
18 of 22 checks passed
penghuo pushed a commit that referenced this pull request Jun 16, 2025
* Fix antlr4 parser issues

Signed-off-by: Lantao Jin <ltjin@amazon.com>

* Case insensitive lexer

Signed-off-by: Lantao Jin <ltjin@amazon.com>

---------

Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: xinyual <xinyual@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] ANTLR4 Grammar issues

4 participants