Skip to content

[C++][Compute] Refactor CheckScalar* to take Datum arguments #28675

@asfimport

Description

@asfimport

CheckScalar*() are useful functions, but expressing all permutations of input shape in the public signature is overkill. We should consolidate these from

// Scalar - Scalar
void CheckScalarBinary(std::string func_name, std::shared_ptr<Scalar> left_input,
                       std::shared_ptr<Scalar> right_input,
                       std::shared_ptr<Scalar> expected,
                       const FunctionOptions* options = nullptr);

// Array - Array
void CheckScalarBinary(std::string func_name, std::shared_ptr<Array> left_input,
                       std::shared_ptr<Array> right_input,
                       std::shared_ptr<Array> expected,
                       const FunctionOptions* options = nullptr);

// Array-Scalar
// Scalar-Array
// ...

to

void CheckScalarBinary(std::string func_name, Datum left_input,
                       Datum right_input,
                       Datum expected,
                       const FunctionOptions* options = nullptr);

Reporter: Ben Kietzman / @bkietz
Assignee: Fernando Rodriguez / @diegodfrf

PRs and other links:

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions