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/08/23 22:43:02 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16914692#comment-16914692 ] 

Julian Hyde commented on CALCITE-3286:
--------------------------------------

Work in progress: https://github.com/julianhyde/calcite/tree/3286-join-on-expressions

> 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
>
> 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.2#803003)