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

Jiatao Tao commented on CALCITE-2823:
-------------------------------------

Hi [~zabetak] , 

Current only SqlSequenceValueOperator override isDeterministic, so 
RexUtil#isDeterministic will return false only in SqlSequenceValueOperator.

Func like RAND doesn't override isDeterministic, these func seems are not 
deterministic(the list comes from "isDynamicFunction"):

1. SqlAbstractTimeFunction

2. SqlBaseContextVariable

3. SqlCurrentDateFunction

4. SqlRandFunction

5. SqlRandIntegerFunction

Hope to hear you opinion

> Prevent optimization of non-deterministic functions
> ---------------------------------------------------
>
>                 Key: CALCITE-2823
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2823
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Siddharth Teotia
>            Priority: Major
>
> RexSimplify and RexProgram optimize expressions like A() = A() to true, but 
> if A() is a non-deterministic expression, this optimization is invalid. 
> Change RexSimplify and RexProgram to check if expression is deterministic or 
> not, in order to decide about the optimization.



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

Reply via email to