ESQL: Refactor Join inside the planner (#115813) #116045
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First PR that introduces a Join as a first class citizen in the planner.
Previously the Join was modeled as a unary node, embedding the right
side as a local relationship inside the node but not exposed as a child.
This caused a lot the associated methods (like references, output and
inputSet) to misbehave and the physical plan rules to pick incorrect
information, such as trying to extract the local relationship fields
from the underlying source - the fix was to the local relationship
fields as ReferenceAttribute (which of course had its own set of
issues). Essentially Join was acting both as a source and as a streaming
operator.
This PR looks to partially address this by:
branches which are used for its references and input/outputSet.
on the join right branch. This reuses the Aggregate resolution out of
the box; in the process remove the Stats interface.
(no need to unpack the phased classes, the join already indicates the
two branches needed).
Relates #112266
Not all inline and lookup tests are passing:
fix this)
I've disabled the tests for now to have them around once we complete
adding the functionality.
(cherry picked from commit 4ee98e8)
(cherry picked from commit 681f509)