-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[ES|QL] Traversal high level APIs #189957
[ES|QL] Traversal high level APIs #189957
Conversation
…raversal-high-level-api
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
Pinging @elastic/kibana-esql (Team:ESQL) |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Public APIs missing exports
Page load bundle
To update your PR or re-run it, just comment with: |
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.
Beautifully done 👏
Summary
Closes #182255
Implements high-level AST node finding APIs, which satisfy requirements in #182255
"visitAny"
callback, which capture any AST node (not captured by a more specific callback).Walker.find(ast, predicate)
— finds the first AST node that satisfies apredicate
condition.Walker.findAll(ast, predicate)
— finds all AST nodes that satisfies apredicate
condition.Walker.match(ast, template)
— finds the first AST node that matches the provided nodetemplate
.Walker.matchAll(ast, template)
— finds all AST nodes that match the provided nodetemplate
.For example, here is how you find all
agg1
andagg2
function nodes:Checklist
Delete any items that are not applicable to this PR.
For maintainers