You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (JIRA)" <ji...@apache.org> on 2018/09/15 15:54:00 UTC

[jira] [Commented] (ARROW-3239) [C++] Improve random data generation functions

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

Antoine Pitrou commented on ARROW-3239:
---------------------------------------

And/or perhaps a RandomState-like API.
{code:c++}
auto rand = RandomState(seed);
auto arr = rand.int32_array(length);
auto arr = rand.varbinary_array(length, {min_value_size, max_value_size});
{code}


> [C++] Improve random data generation functions
> ----------------------------------------------
>
>                 Key: ARROW-3239
>                 URL: https://issues.apache.org/jira/browse/ARROW-3239
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Wes McKinney
>            Priority: Major
>
> Our various code for generating random datasets for testing and benchmarks is a bit verbose / awkward.
> I suggest defining a nicer API so we can write code like:
> {code}
> auto arr = random::int32(length, seed);
> auto arr = random::varbinary(length, max_value_size, seed);
> {code}
> Since this is only for test code, we can abort if anything returns error Status to make the API more convenient



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)