You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jesus Camacho Rodriguez (JIRA)" <ji...@apache.org> on 2018/05/01 16:16:00 UTC

[jira] [Updated] (CALCITE-2292) Query result is wrong when table is implemented with FilterableTable and the sql has multiple where conditions

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

Jesus Camacho Rodriguez updated CALCITE-2292:
---------------------------------------------
    Summary: Query result is wrong when table is implemented with FilterableTable and the sql has multiple where conditions  (was: !!! Query result is wrong when table is implemented with FilterableTable and the sql has multiple where conditions)

> Query result is wrong when table is implemented with FilterableTable and the sql has multiple where conditions
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-2292
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2292
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.16.0
>         Environment: version 1.16.0
>            Reporter: cnzhujie
>            Assignee: Julian Hyde
>            Priority: Major
>         Attachments: image-2018-05-01-23-20-57-853.png
>
>
> you can reappearance this bug in test case `org.apache.calcite.test.CsvTest#testFilterableSelect`.
>  
> Try execute this sql:
> {code:java}
> sql("filterable-model", "select name from EMPS where name not like '%F%' and name like '%e%'").ok();
> {code}
> The code generate in method `org.apache.calcite.interpreter.JaninoRexCompiler#compile`
> !image-2018-05-01-23-20-57-853.png!
> {code:java}
> {
> final Object[] current = context.values;
> final String inp1_ = current[1] == null ? (String) null : current[1].toString();
> outputValues[0] = (inp1_ == null || org.apache.calcite.runtime.SqlFunctions.like(inp1_, "%e%")) && !(inp1_ != null && org.apache.calcite.runtime.SqlFunctions.like(inp1_, "%F%")) ? (inp1_ == null || inp1_ != null ? (Boolean) null : Boolean.TRUE) : Boolean.FALSE;
> }
> {code}
> This bug can be reappearanced in 1.17.0-SNAPSHOT、1.16.0、1.13.0
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)