-
Notifications
You must be signed in to change notification settings - Fork 25.8k
ES|QL: Fix column references for FORK #127209
Copy link
Copy link
Closed
Labels
:Search Relevance/SearchCatch all for Search RelevanceCatch all for Search Relevance>bugTeam:Search RelevanceMeta label for the Search Relevance team in ElasticsearchMeta label for the Search Relevance team in Elasticsearchpriority:highA label for assessing bug priority to be used by ES engineersA label for assessing bug priority to be used by ES engineersv9.1.0
Metadata
Metadata
Assignees
Labels
:Search Relevance/SearchCatch all for Search RelevanceCatch all for Search Relevance>bugTeam:Search RelevanceMeta label for the Search Relevance team in ElasticsearchMeta label for the Search Relevance team in Elasticsearchpriority:highA label for assessing bug priority to be used by ES engineersA label for assessing bug priority to be used by ES engineersv9.1.0
Type
Fields
Give feedbackNo fields configured for issues without a type.
related #121950
The constant folding does not work correctly for FORK.
This is one symptom of how we carry and reuse the column references in FORK from the FORK sub plans.
Take this example:
This should only return the results of the first FORK branch, but it ends up returning both.
The reason for this is because when constant folding is done at the level of the logical plan optimizer the condition
| WHERE a == 1becomesWHERE true. The reference for theacolumn is the one from the first FORK branch.We should fix the output of FORK, such that we don't reuse the same columns references from the FORK branches.
I assume
STATSdoes something similar, but I haven't checked yet.