Skip to content

ES|QL: Refactor ChangeLimitOperator#144017

Merged
ioanatia merged 4 commits intoelastic:mainfrom
ioanatia:change_limit_operator_refactor
Mar 12, 2026
Merged

ES|QL: Refactor ChangeLimitOperator#144017
ioanatia merged 4 commits intoelastic:mainfrom
ioanatia:change_limit_operator_refactor

Conversation

@ioanatia
Copy link
Copy Markdown
Member

@ioanatia ioanatia commented Mar 11, 2026

When I first added the LinearScoreEvalOperator, I took inspiration from the ChangeLimitOperator, because it required gathering all input pages, before it would output any.

We then added the MMROperator in #141324, which again needs to see all input before outputting any pages.
In that same PR we added an abstract CompleteInputCollectorOperator which both LinearScoreEvalOperator and MMROperator extend.

we are now refactoring ChangeLimitOperator to extend from CompleteInputCollectorOperator too.

@ioanatia ioanatia added >non-issue Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch :Search Relevance/ES|QL Search functionality in ES|QL labels Mar 11, 2026
@ioanatia ioanatia marked this pull request as ready for review March 11, 2026 14:12
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

Copy link
Copy Markdown
Member

@carlosdelest carlosdelest left a comment

Choose a reason for hiding this comment

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

Nice!


@Override
protected void onClose() {
for (Page page : outputPages) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unrelated, but - should we change the following line to Releasable.close(outputPages)?

Copy link
Copy Markdown
Contributor

@jan-elastic jan-elastic left a comment

Choose a reason for hiding this comment

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

LGTM

@ioanatia ioanatia merged commit 8823111 into elastic:main Mar 12, 2026
36 checks passed
@ioanatia ioanatia deleted the change_limit_operator_refactor branch March 12, 2026 14:22
szybia added a commit to szybia/elasticsearch that referenced this pull request Mar 12, 2026
…elocations

* upstream/main: (49 commits)
  CCS logging fixes (elastic#144070)
  Improve CPS cluster exclusion handling (elastic#143488)
  Remove snapshot condition now that node_reduce phase is in non-snapshot builds (elastic#144090)
  Drop deprecation warnings when updating a mapping in the cluster state applier (elastic#143884) (elastic#144040)
  Add ensureGreenAndNoInitializingShards helper (elastic#144044)
  Removed unnecessary applies_to blocks from deprecated query (elastic#144096)
  [CPS] Use single CrossProjectModeDecider instance (elastic#144030)
  Fix ESQL TS requests with LIMIT 0 (elastic#144031)
  ESQL: Remove `create` methods in aggs (elastic#144098)
  ES|QL: Refactor ChangeLimitOperator (elastic#144017)
  Add Paginated Hit Source Tests (elastic#142592)
  Fix test failure not preferred (elastic#144019)
  Remove serialization logic from EIS authorization response (elastic#144021)
  ESQL: CSV schema inference and parsing enhancements (elastic#144050)
  ESQL: Fix incorrectly optimized fork with nullify unmapped_fields (elastic#143030)
  Fix MMR release test using subqueries (elastic#144087)
  Refactoring `UserAgentPlugin` (elastic#140712)
  Drop non-finite samples in Prometheus remote write (elastic#144055)
  [TEST] Wait for internal inference indices to be created in authorization IT (elastic#143885)
  Disable ndjson datasource QA tests in release-tests (elastic#143992)
  ...
michalborek pushed a commit to michalborek/elasticsearch that referenced this pull request Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>non-issue :Search Relevance/ES|QL Search functionality in ES|QL Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants