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 2020/10/30 21:47:00 UTC

[jira] [Commented] (CALCITE-4366) LatticeSuggester should treat UNION / VALUES sub-expressions as tables

    [ https://issues.apache.org/jira/browse/CALCITE-4366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17223923#comment-17223923 ] 

Julian Hyde commented on CALCITE-4366:
--------------------------------------

Work in progress: [julianhyde/4366-lattice-union|https://github.com/julianhyde/calcite/tree/4366-lattice-union].

> LatticeSuggester should treat UNION / VALUES sub-expressions as tables
> ----------------------------------------------------------------------
>
>                 Key: CALCITE-4366
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4366
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>            Priority: Major
>
> LatticeSuggester should treat UNION / VALUES sub-expressions as tables, and generate a LatticeTable for each.
> If those expressions occur as a common-table expression (CTE; i.e. in the WITH clause) the LatticeTable should have the name and column names of that CTE.
> For example, given the query
> {code}
> WITH SubDept (id, name) AS (SELECT deptno, dname FROM Dept)
> SELECT *
> FROM Emp AS e
> JOIN SubDept AS d ON e.deptno = d.id
> {code}
> {{LatticeSuggester}} should generate {{LatticeTable(Emp (empno, deptno, ename, sal))}} and {{LatticeTable(SubDept (id, name))}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)