ES|QL Fork Command #121652
Labels
Meta
priority:high
A label for assessing bug priority to be used by ES engineers
:Search Relevance/Search
Catch all for Search Relevance
Team:Search Relevance
Meta label for the Search Relevance team in Elasticsearch
v9.1.0
Fork is a foundational building block to support multiple-subqueries, RRF, and much more.
What is FORK?
Conceptually, fork is:
The name, fork, is somewhat inspired by unix fork, and other streamy frameworks, since the concept of forked execution is quite familiar. Other names considered and discounted are: union, merge, combine, tee, tpipe. While conceptually similar, the aforementioned names would likely lead to confusion with similar (but different) concepts in other languages, e.g. SQL union.
Example:
Conceptual data flow:
Actual execution flow:
The planner and execution is free to reorganise things as long as it adheres to the conceptual flow of data.
Building upon the previous example, now with a common pre-filter:
Where the
FORK
is “pushable”, then the common pre-filter and theWHERE
of each fork branch is pushed down to be an effective subquery.Where the
FORK
is not pushable, e.g. after aSTATS
, then the fork implementation will “fan-out” and merge within the compute engine. That is, the implementation will be more like the initial conceptual diagram above.### Initial Restrictions
A number of initial restrictions have been put in place in order to make progress and unblock other development efforts dependent on Fork, e.g. RRF.
The restrictions are:
Development outline and evolution
We will lift all the restrictions as outlined above, but not all at once and not necessarily in the outlined order.
Since FORK is a significant feature, its development will be broken down over several other smaller PRs and issues. This section is intended to capture the current state and future plans as we progress towards a complete implementation. As such, consider this section "live", as new PRs and issues are filed they can be linked here.
The text was updated successfully, but these errors were encountered: