Mihai Budiu created CALCITE-7196:
------------------------------------
Summary: Create an optimization pass which can convert some cases
of Correlate + Unnest to Unnest
Key: CALCITE-7196
URL: https://issues.apache.org/jira/browse/CALCITE-7196
Project: Calcite
Issue Type: New Feature
Components: core
Affects Versions: 1.40.0
Reporter: Mihai Budiu
Assignee: Mihai Budiu
Today UNNEST is always compiled into a Correlate + Unnest.
Some query plans of this shape can be simplified however:
{code}
Project
Correlate
LeftInput
Uncollect
Project(correlatedVariable) // only one field here
Values
{code}
If the Project only preserves fields from the right-side of the Correlate, such
plans can be rewritten as
{code}
Project
Uncollect
LeftInput
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)