[
https://issues.apache.org/jira/browse/PHOENIX-1516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14256427#comment-14256427
]
James Taylor commented on PHOENIX-1516:
---------------------------------------
One more recommendation for the reset call. Instead of calling it from
PhoenixResultSet (I know, I recommended this initially :-( ), I'd create a new
ResetRowProjectionIterator derived from DelegateIterator instead with a
constructor that takes the RowProjector and ResultIteratoras arguments and call
it from the next() method of that. The reason is that our map-reduce
integration doesn't go through PhoenixResultSet, so RAND would malfunction if
used there. There are three places that would need to wrap the iterator with
this new iterator:
- PhoenixRecordReader.initialize():111. This is for the map-reduce integration.
- ScanPlan.newIterator():202. This is for non aggregate scans.
- AggregatePlan.newIterator():205. This is for aggregate scans.
A secondary factor that makes this better is to try to have as little logic in
PhoenixResultSet as possible, since if/when we have a thin driver, this likely
won't be the implementor any longer.
> 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-v2.txt, 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)