Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
Impala 0.5
-
None
-
None
Description
This looks to be a planner bug that happens when there are 3 or more tables and the last table in the FROM clause is an in-line view and it is the common join condition for the other two tables. See test cases below.
explain /* fails */
select s1.s_store_sk
from
store s2,
store s3,
(select s_store_sk from store) s1
where
s1.s_store_sk = s2.s_store_sk and
s1.s_store_sk = s3.s_store_sk
limit 100;
ERROR: com.cloudera.impala.common.NotImplementedException: Join requires at least one equality predicate between the two tables.
at com.cloudera.impala.planner.Planner.createHashJoinNode(Planner.java:793)
at com.cloudera.impala.planner.Planner.createSelectPlan(Planner.java:489)
at com.cloudera.impala.planner.Planner.createQueryPlan(Planner.java:457)
at com.cloudera.impala.planner.Planner.createPlanFragments(Planner.java:92)
at com.cloudera.impala.service.Frontend.createExecRequest(Frontend.java:253)
at com.cloudera.impala.service.Frontend.getExplainString(Frontend.java:150)
at com.cloudera.impala.service.JniFrontend.getExplainPlan(JniFrontend.java:109)
explain /* works */
select s1.s_store_sk
from
(select s_store_sk from store) s1,
store s2,
store s3
where
s1.s_store_sk = s2.s_store_sk and
s1.s_store_sk = s3.s_store_sk
limit 100;
explain /* works */
select s3.s_store_sk
from
store s3,
store s2,
(select s_store_sk from store) s1
where
s2.s_store_sk = s1.s_store_sk and
s2.s_store_sk = s3.s_store_sk
limit 100;