Skip to content

AST improvement: remove unnecessary [node] boxing into arrays - #236

Open
vadimkibana wants to merge 28 commits into
mainfrom
parser-node-unboxing
Open

AST improvement: remove unnecessary [node] boxing into arrays#236
vadimkibana wants to merge 28 commits into
mainfrom
parser-node-unboxing

Conversation

@vadimkibana

@vadimkibana vadimkibana commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes elastic/kibana#222505

This PR specifically addresses the last part of the issue: [node] unboxing in AST elastic/kibana#222505 (comment) - removing unnecessary wrapping into arrays AST nodes.

BREAKING CHANGE: ES|QL AST and types shape has changed

Details

This PR adds breaking changes to the AST shape: once used in Kibana validation/autocomplete will need fixes. See description of breaking changes in the Changesets entry for this PR. In short:

  • Some places where [node] was boxed in array are now plain node
  • Some places represented nodes with syntax error used empty array [], now they are {type: 'unknown'} nodes.
  • resolveItem(), singleItem() and other helpers used to work around these node-wrapping-into-array inconsistencies are now deprecated, and we should aim to remove them during next major bump.

Checklist

  • Unit tests have been added or updated.
  • The proper documentation has been added or updated.
  • A changeset has been added (yarn changeset) if this change should be released. See docs/RELEASE.md.
  • If this PR contains breaking changes, you have explained them using the BREAKING CHANGE: change syntax and selected a major bump in the changeset.
  • The PR is opened as a draft until CI is green.

@vadimkibana
vadimkibana marked this pull request as ready for review August 28, 2026 08:57
@vadimkibana
vadimkibana requested a review from a team as a code owner August 28, 2026 08:57
@vadimkibana
vadimkibana force-pushed the parser-node-unboxing branch from 6b644a2 to c7e467e Compare August 28, 2026 09:11
@vadimkibana vadimkibana changed the title Parser node unboxing AST improvement: remove unnecessary [node] boxing into arrays Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ES|QL] AST package parser/ folder restructuring

1 participant