Skip to content

[C++] Improve random data generation functions #19581

Closed

Description

@asfimport

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:

auto arr = random::int32(length, seed);
auto arr = random::varbinary(length, max_value_size, seed);

Since this is only for test code, we can abort if anything returns error Status to make the API more convenient

Reporter: Wes McKinney / @wesm
Assignee: Francois Saint-Jacques / @fsaintjacques

PRs and other links:

Note: This issue was originally created as ARROW-3239. Please see the migration documentation for further details.

Activity

  1. asfimport commented on Sep 15, 2018

    @asfimport
    Author

    Antoine Pitrou / @pitrou:
    And/or perhaps a RandomState-like API.

    auto rand = RandomState(seed);
    auto arr = rand.int32_array(length);
    auto arr = rand.varbinary_array(length, {min_value_size, max_value_size});
  2. asfimport commented on Sep 15, 2018

    @asfimport
    Author

    Wes McKinney / @wesm:
    Sounds good to me

  3. asfimport commented on Nov 21, 2018

    @asfimport
    Author

    Wes McKinney / @wesm:
    cc @fsaintjacques @bkietz, you might have a look at this (after #2997 is merged)

  4. asfimport commented on Feb 5, 2019

    @asfimport
    Author

    Uwe Korn / @xhochy:
    Issue resolved by pull request 3533
    #3533

  5. added this to the 0.13.0 milestone on Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions