You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2015/05/05 15:38:28 UTC

[jira] [Updated] (DRILL-2830) Self-Join via view gives wrong results

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

Jacques Nadeau updated DRILL-2830:
----------------------------------
    Fix Version/s: 1.2.0

> Self-Join via view gives wrong results
> --------------------------------------
>
>                 Key: DRILL-2830
>                 URL: https://issues.apache.org/jira/browse/DRILL-2830
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>            Reporter: Sean Hsuan-Yi Chu
>            Assignee: Sean Hsuan-Yi Chu
>            Priority: Critical
>             Fix For: 1.2.0
>
>
> Create a view by:
> {code}
> create view v1(x, y) as select n_regionkey,  n_nationkey from cp.`tpch/nation.parquet`;
> {code}
> And join this view with the file which created the view with condition t.n_nationkey  = v1.y (where 'y' is n_nationkey)
> {code}
> select t.n_nationkey from cp.`tpch/nation.parquet` t inner join v1 on t.n_nationkey  = v1.y;
> {code}
> +-------------+
> | n_nationkey |
> +-------------+
> | 0           |
> | 1           |
> | 1           |
> | 1           |
> | 4           |
> | 0           |
> | 3           |
> | 3           |
> | 2           |
> | 2           |
> | 4           |
> | 4           |
> | 2           |
> | 4           |
> | 0           |
> | 0           |
> | 0           |
> | 1           |
> | 2           |
> | 3           |
> | 4           |
> | 2           |
> | 3           |
> | 3           |
> | 1           |
> +-------------+
> 25 rows selected (0.153 seconds)
> After investigating the plan, I found out that the result was produced as if the join condition was t.n_nationkey  = v1.x (where x is 'n_regionkey')



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