[
https://issues.apache.org/jira/browse/DRILL-882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14057914#comment-14057914
]
Jacques Nadeau commented on DRILL-882:
--------------------------------------
Fixed the CanNotPlanExceptin with code change in Optiq.
select p.p_partkey
from hive.part p, cp.`tpch/partsupp.parquet` ps
where p.p_partkey = cast(ps.ps_partkey as int)
order by p.p_partkey
limit 20;
+------------+
| p_partkey |
+------------+
| 1 |
| 1 |
| 1 |
| 1 |
| 2 |
| 2 |
| 2 |
| 2 |
| 3 |
| 3 |
| 3 |
| 3 |
| 4 |
| 4 |
| 4 |
| 4 |
| 5 |
| 5 |
| 5 |
| 5 |
+------------+
20 rows selected (0.625 seconds)
Note, if we remove the "cast" function, Drill will return 0 row. That's a
different issue, which will be addressed seperately.
> Join between hive table and parquet file fail
> ---------------------------------------------
>
> Key: DRILL-882
> URL: https://issues.apache.org/jira/browse/DRILL-882
> Project: Apache Drill
> Issue Type: Bug
> Components: Query Planning & Optimization
> Reporter: Ramana Inukonda Nagaraj
> Assignee: Jinfeng Ni
> Priority: Critical
> Fix For: 1.0.0-BETA1
>
>
> The following query fails with a cannot plan error
> select p.p_partkey
> from hive.part p, `tpch-multi/partsupp` ps
> where p.p_partkey = ps.ps_partkey
> and p.p_size = 41
> order by p.p_partkey
> limit 20;
> The below queries work fine implying nothing is wrong with the source
> select p.p_partkey
> from hive.part p;
>
> select ps.ps_partkey from `tpch-multi/partsupp` ps;
> The same query also works when both sides of join is from parquet or hive.
> Its only when they are different that I get the below cannot plan error.
> message: "Failure while parsing sql. < CannotPlanException:[ Node
> [rel#2666:Subset#26.PHYSICAL.SINGLETON([]).[]] could not be implemented;
> planner state:
--
This message was sent by Atlassian JIRA
(v6.2#6252)