You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/04/26 08:34:00 UTC

[jira] [Commented] (DRILL-7050) RexNode convert exception in subquery

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

ASF GitHub Bot commented on DRILL-7050:
---------------------------------------

vvysotskyi commented on pull request #1770: DRILL-7050: RexNode convert exception in sub-query
URL: https://github.com/apache/drill/pull/1770
 
 
   - Bumped up Calcite version to include a fix for CALCITE-2954;
   - Added a call to validate query when `inferUnknownTypes()` is called to replace temporary table name in sub-queries from the project list;
   - Added unit tests for both issues.
   
   For problem description please see [DRILL-7050](https://issues.apache.org/jira/browse/DRILL-7050).
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> RexNode convert exception in subquery
> -------------------------------------
>
>                 Key: DRILL-7050
>                 URL: https://issues.apache.org/jira/browse/DRILL-7050
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.14.0, 1.15.0
>            Reporter: Oleg Zinoviev
>            Assignee: Arina Ielchiieva
>            Priority: Major
>             Fix For: 1.17.0
>
>
> If the query contains a subquery whose filters are associated with the main query, an error occurs: *PLAN ERROR: Cannot convert RexNode to equivalent Drill expression. RexNode Class: org.apache.calcite.rex.RexCorrelVariable*
> Steps to reproduce:
> 1) Create source table (or view, doesn't matter)
> {code:sql}
> create table dfs.root.source as  (
>     select 1 as id union all select 2 as id
> )
> {code}
> 2) Execute query
> {code:sql}
> select t1.id,
> 	(select count(t2.id) 
> 	from dfs.root.source t2 where t2.id = t1.id)
> from  dfs.root.source t1
> {code}
> Reason: 
> Method {code:java}org.apache.calcite.sql2rel.SqlToRelConverter.Blackboard.lookupExp{code}  call {code:java}RexBuilder.makeCorrel{code} in some cases



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)