Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Drill query cannot be planned possibly due to either a cartesian join or an inequality join

Solved Go to solution
Highlighted

Drill query cannot be planned possibly due to either a cartesian join or an inequality join

New Contributor

Hello,

Im performing a tpch benchmark using drill, the queries are stored in sql file and are executed over a hive schema (with tables stored as orc). When i try to run query 22 (ill put the code next), Drill gives an error of "Error: UNSUPPORTED_OPERATION ERROR: This query cannot be planned possibly due to either a cartesian join or an inequality join". The same happens in query 22 of tpch, can some tell me how to fix the query?

Query code:

"SELECT S_NAME, COUNT(*) AS NUMWAIT FROM SUPPLIER, LINEITEM L1, ORDERS, NATION WHERE S_SUPPKEY = L1.L_SUPPKEY AND O_ORDERKEY = L1.L_ORDERKEY AND O_ORDERSTATUS = 'F' AND L1.L_RECEIPTDATE> L1.L_COMMITDATE AND EXISTS (SELECT * FROM LINEITEM L2 WHERE L2.L_ORDERKEY = L1.L_ORDERKEY AND L2.L_SUPPKEY <> L1.L_SUPPKEY) AND NOT EXISTS (SELECT * FROM LINEITEM L3 WHERE L3.L_ORDERKEY = L1.L_ORDERKEY AND L3.L_SUPPKEY <> L1.L_SUPPKEY AND L3.L_RECEIPTDATE > L3.L_COMMITDATE) AND S_NATIONKEY = N_NATIONKEY AND N_NAME = 'SAUDI ARABIA' GROUP BY S_NAME ORDER BY NUMWAIT DESC, S_NAME LIMIT 100;"

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Drill query cannot be planned possibly due to either a cartesian join or an inequality join

@mÁRIO Rodrigues

This seems to be known issue and Jira DRILL-5214 has been raised for the same.

1 REPLY 1

Re: Drill query cannot be planned possibly due to either a cartesian join or an inequality join

@mÁRIO Rodrigues

This seems to be known issue and Jira DRILL-5214 has been raised for the same.

Don't have an account?
Coming from Hortonworks? Activate your account here