[
https://issues.apache.org/jira/browse/CALCITE-4719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde reassigned CALCITE-4719:
------------------------------------
Assignee: Julian Hyde
> Add variants of RexSubQuery that collect sub-queries into MULTISET, ARRAY and
> MAP collections
> ---------------------------------------------------------------------------------------------
>
> Key: CALCITE-4719
> URL: https://issues.apache.org/jira/browse/CALCITE-4719
> Project: Calcite
> Issue Type: Bug
> Environment: Add variants of {{RexSubQuery}} that collect sub-queries
> into {{MULTISET}}, {{ARRAY}} and {{MAP}} collections. We currently use
> {{RexSubQuery}} for scalar sub-query, {{EXISTS}}, {{IN}} and some others;
> this allows us to defer conversion: convert via rewrites ({{RelOptRule}})
> rather than in {{SqlToRelConverter}}. The same benefits would apply to
> {{MULTISET}}, {{ARRAY}} and {{MAP}} sub-queries.
> Examples:
> {code}
> SELECT deptno, MULTISET(SELECT * FROM Emp WHERE deptno = d.deptno)
> FROM Dept AS d
> SELECT deptno, ARRAY(SELECT * FROM Emp WHERE deptno = d.deptno)
> FROM Dept AS d
> SELECT deptno, MAP(SELECT empno, job FROM Emp WHERE deptno = d.deptno)
> FROM Dept AS d
> {code}
> Reporter: Julian Hyde
> Assignee: Julian Hyde
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)