Skip to content

Conversation

@ayush-shah
Copy link
Member

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:

  • Updated the EntityLink.g4 grammar to allow nameOrFqn to match NAME_OR_FQN, ENTITY_TYPE, or ENTITY_FIELD, ensuring that reserved keywords can be parsed as column names.

Listener and parser implementation changes:

  • Renamed methods from enterNameOrFQN to enterNameOrFqn in 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:

  • Added unit tests to test_entity_link.py that verify entity links with reserved keywords (ENTITY_TYPE and ENTITY_FIELD) as column names are correctly split by the parser.

@github-actions
Copy link
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2025

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.43% (49461/77981) 40.5% (23646/58383) 44.29% (7494/16921)

@ayush-shah
Copy link
Member Author

@copilot add tests and playwright for Entitylink grammar and some tests for wherever these entitylink grammar is used.
create on top of this PR

Copy link
Contributor

Copilot AI commented Nov 21, 2025

@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.

@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants