You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2020/10/29 20:50:00 UTC
[jira] [Created] (CALCITE-4366) LatticeSuggester should treat UNION
/ VALUES sub-expressions as tables
Julian Hyde created CALCITE-4366:
------------------------------------
Summary: 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
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)