You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2019/09/20 19:55:00 UTC

[jira] [Resolved] (CALCITE-3286) In LatticeSuggester, allow join conditions that use expressions

     [ https://issues.apache.org/jira/browse/CALCITE-3286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde resolved CALCITE-3286.
----------------------------------
    Fix Version/s: 1.22.0
       Resolution: Fixed

Fixed in [29d8508f|https://github.com/apache/calcite/commit/29d8508f591be79683d0efeb3541dc3bdbc36d44].

> In LatticeSuggester, allow join conditions that use expressions
> ---------------------------------------------------------------
>
>                 Key: CALCITE-3286
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3286
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Priority: Major
>             Fix For: 1.22.0
>
>
> In {{LatticeSuggester}}, allow join conditions that use expressions. For example, the query
> {code}
> select *
> from emp
> join dept on emp.deptno + 1 = dept.deptno
> {code}
> uses an expression "emp.deptno + 1" on the "emp" side of the join key.
> Currently this query throws:
> {noformat}
> 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)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)