Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
In LatticeSuggester, allow join conditions that use expressions. For example, the query
select * from emp join dept on emp.deptno + 1 = dept.deptno
uses an expression "emp.deptno + 1" on the "emp" side of the join key.
Currently this query throws:
java.lang.ClassCastException: class org.apache.calcite.materialize.LatticeSuggester$DerivedColRef cannot be cast to class org.apache.calcite.materialize.LatticeSuggester$BaseColRef at org.apache.calcite.materialize.LatticeSuggester.frame(LatticeSuggester.java:478) at org.apache.calcite.materialize.LatticeSuggester.frame(LatticeSuggester.java:420) at org.apache.calcite.materialize.LatticeSuggester.frame(LatticeSuggester.java:399) at org.apache.calcite.materialize.LatticeSuggester.addQuery(LatticeSuggester.java:124)