-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.22.0
-
Component/s: None
-
Labels:None
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)