Skip to content

Conversation

@MattAlp
Copy link
Contributor

@MattAlp MattAlp commented Jan 6, 2026

This consolidates the EsqlProject class into Project, eliminating unnecessary class hierarchy originating from the QL merge. We've been meaning to do this for a while, #139248 did a lot of similar heavy lifting recently.

The changes themselves:

  • Merged lenient expressionsResolved() behavior from EsqlProject into Project, allowing UnsupportedAttribute to pass through projections unchanged
  • Added ESQL_PROJECT_ENTRY to PlanWritables for backward compatibility when deserializing old "EsqlProject" plans from mixed-version clusters
  • Added checkUnsupportedAttributeRenaming() to Verifier to ensure renaming UnsupportedAttribute via Alias is still blocked (this check now runs unconditionally, not gated by resolved() status)
  • Added regression tests validating UnsupportedAttribute pass-through and rename-blocking behavior

Closes #109195

@elasticsearchmachine elasticsearchmachine added v9.4.0 needs:triage Requires assignment of a team area label labels Jan 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

ℹ️ Important: Docs version tagging

👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version.

We use applies_to tags to mark version-specific features and changes.

Expand for a quick overview

When to use applies_to tags:

✅ At the page level to indicate which products/deployments the content applies to (mandatory)
✅ When features change state (e.g. preview, ga) in a specific version
✅ When availability differs across deployments and environments

What NOT to do:

❌ Don't remove or replace information that applies to an older version
❌ Don't add new information that applies to a specific version without an applies_to tag
❌ Don't forget that applies_to tags can be used at the page, section, and inline level

🤔 Need help?

@MattAlp MattAlp added >refactoring >tech debt :Analytics/ES|QL AKA ESQL and removed needs:triage Requires assignment of a team area label labels Jan 6, 2026
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jan 6, 2026
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

Merges the EsqlProject class into Project, eliminating unnecessary class
hierarchy after the QL merge. Key changes:

- Move lenient expressionsResolved() behavior from EsqlProject to Project,
  allowing UnsupportedAttribute to pass through projections unchanged
- Add ESQL_PROJECT_ENTRY to PlanWritables for backward compatibility when
  deserializing old "EsqlProject" plans from mixed-version clusters
- Add checkUnsupportedAttributeRenaming() to Verifier to ensure renaming
  UnsupportedAttribute via Alias is still blocked (this check now runs
  unconditionally, not gated by resolved() status)
- Update all instantiation sites to use Project instead of EsqlProject
- Update comments referencing EsqlProject

Closes elastic#111957
- Replace all EsqlProject references with Project in test assertions
- Remove EsqlProjectSerializationTests (no longer needed)
- Add regression tests in VerifierTests to validate that:
  - UnsupportedAttribute can pass through KEEP (Project) unchanged
  - Renaming UnsupportedAttribute fails even after passing through KEEP
@MattAlp MattAlp force-pushed the consolidate-esql-project branch from 61512a8 to 199dd85 Compare January 6, 2026 20:54
@MattAlp MattAlp requested a review from nik9000 January 6, 2026 21:04
Copy link
Contributor

@idegtiarenko idegtiarenko left a comment

Choose a reason for hiding this comment

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

Left couple of suggestions, overall looks good to me.
I am not changing this area often so it would be nice to have one extra review for this change.

Copy link
Contributor

@ivancea ivancea left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

@MattAlp MattAlp force-pushed the consolidate-esql-project branch from 4eabb62 to d819361 Compare January 7, 2026 14:44
We warn for unhandled annotations because of codegen
Test assertions will fail during deser if we create a `Project` with the name `EsqlProject` (old -> new transmission)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be moved with the annotation in :libs:core?
Depending on if we can use UpdateForV10.class.getCanonicalName(), this processor may be difficult to find. Unless it fails on compile time anyway, which could work I guess.

Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

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

LGTM

/**
* Backward compatibility entry + name for reading the consolidated `EsqlProject` plans from pre-9.4.0 nodes.
*/
private static final String LEGACY_PROJECT_NAME = "EsqlProject";
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: If this is something that is targeted to ESQL team, I think LEGACY_LOGICAL_PLAN_NAME describes better the constant and intention.

Copy link
Contributor

@alex-spies alex-spies left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @MattAlp !

@alex-spies
Copy link
Contributor

Ah, @MattAlp , because this affects serialization, you may want to run the CI with the test-full-bwc label on this PR.

@MattAlp MattAlp added the test-full-bwc Trigger full BWC version matrix tests label Jan 9, 2026
@MattAlp MattAlp merged commit 8975f24 into elastic:main Jan 9, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL >refactoring Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >tech debt test-full-bwc Trigger full BWC version matrix tests v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESQL: Fold EsqlProject into Project

6 participants