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

Jiatao Tao commented on CALCITE-4424:
-------------------------------------

In -CALCITE-1552-  , we add annotation (Deterministic/NonDeterministic), it 
seems mainly for execution, what I proposing here is in RexNode level, mainly 
for optimizing level.

In  CALCITE-4413 , we can see a double rand() after optimization, it not with 
expectations.

We've had a utility method named RexUtil.isDeterministic(RexNode) and I want to 
use this to judge whether a rexnode is deterministic or not, but I think it's 
not imperfect now, like rand(), it returns true.

> Complete non-deterministic function in SqlFunction
> --------------------------------------------------
>
>                 Key: CALCITE-4424
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4424
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Jiatao Tao
>            Assignee: Jiatao Tao
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Current only SqlSequenceValueOperator override isDeterministic, 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
>  
>   



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

Reply via email to