Prasad Nagaraj Subramanya created DRILL-5880: ------------------------------------------------
Summary: java.sql.SQLException: UNSUPPORTED_OPERATION ERROR: This query cannot be planned possibly due to either a cartesian join or an inequality join Key: DRILL-5880 URL: https://issues.apache.org/jira/browse/DRILL-5880 Project: Apache Drill Issue Type: Bug Components: Execution - Relational Operators Affects Versions: 1.11.0 Reporter: Prasad Nagaraj Subramanya Consider the below query {code} select region.sales_region as c0, region_1.sales_region as c1, sum(sales_fact_1997.unit_sales) as m0 from region as region, store as store, sales_fact_1997 as sales_fact_1997, region as region_1, customer as customer where sales_fact_1997.store_id = store.store_id and store.region_id = region.region_id and region.sales_region = 'South West' and sales_fact_1997.customer_id = customer.customer_id and customer.customer_region_id = region_1.region_id and region_1.sales_region = 'South West' group by region.sales_region, region_1.sales_region {code} The query fails with the following error- {code} (org.apache.drill.exec.work.foreman.UnsupportedRelOperatorException) This query cannot be planned possibly due to either a cartesian join or an inequality join org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToPrel():437 org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():169 org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():131 org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():79 org.apache.drill.exec.work.foreman.Foreman.runSQL():991 org.apache.drill.exec.work.foreman.Foreman.run():276 java.util.concurrent.ThreadPoolExecutor.runWorker():1145 java.util.concurrent.ThreadPoolExecutor$Worker.run():615 java.lang.Thread.run():744 {code} This is a regression. It worked with drill 1.10.0 Having a single alias of the table region in the above query works fine. -- This message was sent by Atlassian JIRA (v6.4.14#64029)