You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2021/10/15 00:50:00 UTC
[jira] [Resolved] (CALCITE-4719) Add variants of RexSubQuery that
collect sub-queries into MULTISET, ARRAY and MAP collections
[ https://issues.apache.org/jira/browse/CALCITE-4719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde resolved CALCITE-4719.
----------------------------------
Resolution: Fixed
Fixed in [9c741e44|https://github.com/apache/calcite/commit/9c741e4415362c3358acea09e223d64d9b36b1ae].
> 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
> Reporter: Julian Hyde
> Assignee: Julian Hyde
> Priority: Major
> Fix For: 1.28.0
>
>
> 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}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)