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

Jesus Camacho Rodriguez resolved CALCITE-1396.
----------------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.10.0

Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/ddd70fa .

[~julianhyde], in Hive it was exposed by a query that used the _rand()_ 
function to filter:

_rand() > 30 AND rand() <= 30_

Since the top operator of each conjunct is > and <=, respectively, it was 
considering those conjuncts deterministic and it was folding the full predicate 
incorrectly to _false_.

I think a similar SQL test could be added to Calcite, but I took a quick look 
and I did not find a function similar to _rand()_ or other non deterministic; 
that is why I directly added the unit tests.

> isDeterministic only explores top RexCall
> -----------------------------------------
>
>                 Key: CALCITE-1396
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1396
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.9.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>             Fix For: 1.10.0
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to