You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Sean Hsuan-Yi Chu (JIRA)" <ji...@apache.org> on 2015/07/03 00:35:04 UTC
[jira] [Resolved] (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 ]
Sean Hsuan-Yi Chu resolved DRILL-2830.
--------------------------------------
Resolution: Duplicate
> 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)