Skip to content

[9.2] Replace remote Enrich hack with proper handling of remote Enrich (#134967)#136901

Merged
elasticsearchmachine merged 2 commits intoelastic:9.2from
smalyshev:backport/9.2/pr-134967
Oct 21, 2025
Merged

[9.2] Replace remote Enrich hack with proper handling of remote Enrich (#134967)#136901
elasticsearchmachine merged 2 commits intoelastic:9.2from
smalyshev:backport/9.2/pr-134967

Conversation

@smalyshev
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.2:

Questions ?

Please refer to the Backport tool documentation

…stic#134967)

- The remote Enrich hack and the verification workaround that it necessitates are removed
- Limit with remote Enrich is handled by duplicating the limits around Enrich
- TopN with remote Enrich is handled by duplicating around Enrich and adjusting projections
- Introduced `CardinalityPreserving` interface to mark nodes that preserve cardinality
- Introduced the capability to run optimizations only on coordinator plan (`CoordinatorOnly` interface)
- Added post-optimizer check that ensures remote Enrich is not moved to the coordinator plan

(cherry picked from commit fd6e962)

# Conflicts:
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/LogicalVerifier.java
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/PhysicalVerifier.java
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/PostOptimizationPhasePlanVerifier.java
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/PushDownAndCombineLimits.java
@smalyshev smalyshev added :Analytics/ES|QL AKA ESQL >refactoring auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) labels Oct 21, 2025
@elasticsearchmachine elasticsearchmachine merged commit d68b945 into elastic:9.2 Oct 21, 2025
34 checks passed
@smalyshev smalyshev deleted the backport/9.2/pr-134967 branch October 21, 2025 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >refactoring Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.2.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants