[
https://issues.apache.org/jira/browse/CALCITE-7608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mihai Budiu resolved CALCITE-7608.
----------------------------------
Fix Version/s: 1.43.0
Resolution: Fixed
Fixed in
[https://github.com/apache/calcite/commit/4bf922bbbc1cbd570a2f201339a46a2d8f7a763b]
The rewrite of Unnest was a long process, thank you to all the people who
commented on earlier and current versions of this proposal.
> Enhance Uncollect to support pass-through fields
> ------------------------------------------------
>
> Key: CALCITE-7608
> URL: https://issues.apache.org/jira/browse/CALCITE-7608
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.42.0
> Reporter: Mihai Budiu
> Assignee: Mihai Budiu
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.43.0
>
>
> Today SQL UNNEST is implemented using the Uncollect operator. We propose
> adding an additional capability to Uncollect, which generalize its current
> behavior:
> * support for carrying over non-collection input fields to the output
> unchanged
> This would strictly increase the expressive power of Uncollect, allowing it
> to not only Unnest collections, but also copy some input fields unchanged for
> every element of an unnested collection.
> This would enable us to represent plans using SQL UNNEST without using
> Correlate nodes. A sub-plan containing Project + Correlate + Uncollect +
> Values would become a single Uncollect node. Neither the old nor the new
> decorrelator can actually eliminate Correlate + Uncollect (there is no other
> representation to express the same behavior). Using the new representation we
> can decorrelate many more plans (perhaps all plans).
> A temporary configuration flag would be introduced to control whether
> SqlToRelConverter uses the new form of the operator, or just the old form.
> Hopefully programs that only use the old form would remain unchanged. This
> will give Calcite users time to upgrade to the new representation at their
> own pace.
> This builds on top of the changes made to Uncollect in CALCITE-7670
> CALCITE-7669 , but is an independent feature of these two changes.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)