[ 
https://issues.apache.org/jira/browse/CALCITE-4905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17456360#comment-17456360
 ] 

Stamatis Zampetakis commented on CALCITE-4905:
----------------------------------------------

[~ggigio] Your analysis is really up to the point. The fact that the problem 
cannot be reproduced in the tests or when using Calcite out of the box is 
exactly the fact that JdbcRules fire before (in {{program1}} mentioned above) 
the calc rules. 

Indeed if somebody uses a custom rule set they can end up with a {{JdbcCalc}} 
that can create a bunch of problems as the one in RelToSql conversion that you 
found out so we are definitely talking about a bug.

The way it is right now it seems that {{JdbcCalc}} is completely untested and 
the respective rule never triggers. Based on this it may be better to 
deprecate/remove {{JdbcCalc}} and {{JdbcCalcRule}} since everybody so far rely 
on {{JdbcProject}} and {{JdbcFilter}} than trying to come up with fixes for 
{{JdbcCalc}}.

> JdbcCalc does not extend Calc
> -----------------------------
>
>                 Key: CALCITE-4905
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4905
>             Project: Calcite
>          Issue Type: Bug
>          Components: jdbc-adapter
>    Affects Versions: 1.28.0
>            Reporter: Francesco Gini
>            Assignee: Francesco Gini
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: test_with_failing_JdbcCalc_conversion.patch
>
>
> {{JdbcCalc}} class does not implement Calc. Failing to do that means that
> {{RelToSqlConverter}} cannot translate a plan with {{JdbcCalc}} into sql 
> because {{RelToSqlConverter}} expects
> {code:java}
>  public Result visit(Calc e){code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to