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 2016/12/01 21:21:58 UTC

[jira] [Updated] (CALCITE-365) AssertionError while translating query with WITH and correlated sub-query

     [ https://issues.apache.org/jira/browse/CALCITE-365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde updated CALCITE-365:
--------------------------------
    Labels: sub-query  (was: )

> AssertionError while translating query with WITH and correlated sub-query
> -------------------------------------------------------------------------
>
>                 Key: CALCITE-365
>                 URL: https://issues.apache.org/jira/browse/CALCITE-365
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>              Labels: sub-query
>
> If a query has a WITH clause with column aliases, and also a correlated sub-query, Optiq gives an AssertionError while trying to translate a field name.
> {code:sql}
> with t (a, b) as (select * from (values (1, 2)))
> select * from t where exists (select 1 from emp where deptno = t.a);
> Caused by: java.lang.AssertionError: Internal error: Type 'RecordType(INTEGER A, INTEGER B)' has no field 'EXPR$0'
> 	at org.eigenbase.util.Util.newInternal(Util.java:734)
> 	at org.eigenbase.rex.RexBuilder.makeFieldAccess(RexBuilder.java:133)
> 	at org.eigenbase.sql2rel.SqlToRelConverter.convertIdentifier(SqlToRelConverter.java:3223)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)