[
https://issues.apache.org/jira/browse/CALCITE-2142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16781156#comment-16781156
]
Laurent Goujon commented on CALCITE-2142:
-----------------------------------------
Moreover RAND(1) is deterministic row wise, but not query wise (the function
returns different values for each row), and I'm not sure how it should be
captured.
The operator is marked as dynamic, but that is also quite not right, because
one might be okay to do constant reduction for dynamic functions if one knows
it is not something which will be cached, but RAND() should not be constant
reduced. And most of the simplication code only looks at the deterministic flag
(RexUtil.isDeterministic()) but not at the dynamic one.
> Set rand() function as non-deterministic.
> -----------------------------------------
>
> Key: CALCITE-2142
> URL: https://issues.apache.org/jira/browse/CALCITE-2142
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Josh Wagner
> Priority: Minor
>
> SqlRandFunction should override isDeterministic() such that it returns false.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)