-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix naming consistency for entity link parsing methods and grammar #24388
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
base: main
Are you sure you want to change the base?
Conversation
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
|
@copilot add tests and playwright for Entitylink grammar and some tests for wherever these entitylink grammar is used. |
|
@ayush-shah I've opened a new pull request, #24485, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
|



This pull request updates the entity link parsing logic to better handle cases where reserved keywords (such as entity types and fields) are used as column names in entity links. The changes ensure that the parser and listeners correctly recognize and split entity links containing these keywords, and adds tests to verify this behavior.
Parser and grammar updates:
EntityLink.g4grammar to allownameOrFqnto matchNAME_OR_FQN,ENTITY_TYPE, orENTITY_FIELD, ensuring that reserved keywords can be parsed as column names.Listener and parser implementation changes:
enterNameOrFQNtoenterNameOrFqnin both the Python (split_listener.py) and JavaScript (EntityLinkSplitListener.js) entity link split listeners to match the grammar update and ensure correct parsing behavior. [1] [2]Testing improvements:
test_entity_link.pythat verify entity links with reserved keywords (ENTITY_TYPE and ENTITY_FIELD) as column names are correctly split by the parser.