Skip to content

[C++][Compute] Provide a kernel property testing API #25246

@asfimport

Description

@asfimport

See discussion #7410 (comment)

Testing against random data fuzzes kernel implementations and provides sanity checks across a wide swath of parameter space with minimal configuration. Currently our random tests have a lot of boilerplate for generating the inputs and a lot of ad-hoc code for computing the expected values. It might be worthwhile to have an interface for specifying randomized tests more uniformly.

Since kernels provide introspection of their input and output types we can generate inputs of those types (both scalar and array). For ScalarFunctions, a function with signature Result<std::shared_ptr<Scalar>>(const ScalarVector& args, const FunctionOptions*) will be sufficient to specify the expected behavior, and the expected output can be generated by applying that specification to the broadcast inputs.

Example impl 9085048

Reporter: Ben Kietzman / @bkietz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions