Victoria Markman created DRILL-2345: ---------------------------------------
Summary: Join between drill table and view created on the same table throws unsupported exception Key: DRILL-2345 URL: https://issues.apache.org/jira/browse/DRILL-2345 Project: Apache Drill Issue Type: Bug Components: Query Planning & Optimization Affects Versions: 0.8.0 Reporter: Victoria Markman Assignee: Jinfeng Ni {code} 0: jdbc:drill:schema=dfs> select * from t1 limit 1; +------------+------------+------------+ | a1 | b1 | c1 | +------------+------------+------------+ | 1 | aaaaa | 2015-01-01 | +------------+------------+------------+ 1 row selected (0.068 seconds) 0: jdbc:drill:schema=dfs> create view v1(x,y,z) as select a1, b1, c1 from t1; +------------+------------+ | ok | summary | +------------+------------+ | true | View 'v1' created successfully in 'dfs.aggregation' schema | +------------+------------+ 1 row selected (0.084 seconds) {code} Inner join between table and a view on the same table should work: {code} 0: jdbc:drill:schema=dfs> select * from t1 inner join v1 on t1.a1 = v1.x; Query failed: UnsupportedRelOperatorException: This query cannot be planned possibly due to either a cartesian join or an inequality join Error: exception while executing query: Failure while executing query. (state=,code=0) {code} Self join works: {code} 0: jdbc:drill:schema=dfs> select t1.a1, t1_alias.a1 from t1 inner join t1 t1_alias on t1.a1 = t1_alias.a1; +------------+------------+ | a1 | a10 | +------------+------------+ | 1 | 1 | | 2 | 2 | | 3 | 3 | | 4 | 4 | | 5 | 5 | | 6 | 6 | | 7 | 7 | | 9 | 9 | | 10 | 10 | +------------+------------+ 9 rows selected (0.09 seconds) {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)