[
https://issues.apache.org/jira/browse/PHOENIX-1516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14249502#comment-14249502
]
James Taylor commented on PHOENIX-1516:
---------------------------------------
No, the expression wouldn't be recreated. The reset method is just a callback
(on the client side, as it's already called on the server side) which would
allow an expression to reset any state it's keeping after each row is
processed. In the case of your RandomFunction expression, you'd cache the
random number in a local variable when evaluate is called if not already
cached. Then you'd clear your local variable when reset is called. I believe
this would solve the issue for when a seed argument is used as well.
> Add RANDOM built-in function
> ----------------------------
>
> Key: PHOENIX-1516
> URL: https://issues.apache.org/jira/browse/PHOENIX-1516
> Project: Phoenix
> Issue Type: Bug
> Reporter: Lars Hofhansl
> Assignee: Lars Hofhansl
> Attachments: 1516.txt
>
>
> I often find it useful to generate some rows with random data.
> Here's a simple RANDOM() function that we could use for that.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)