Skip to content

[C++][Compute] Use Status/Result return consistently to indicate errors #18562

@asfimport

Description

@asfimport

Discussion on ML: https://lists.apache.org/thread.html/r7c369390dd0b99edb1e4529920e06e62a1f65802bcdfb34317436fac%40%3Cdev.arrow.apache.org%3E

Wherever there is not a motivating performance reason for error
propagation using KernelContext::{SetStatus, status} remove this in favor of the error pattern used in the rest of the library: returning a Status or (preferably) Result. This will avoid the added cognitive overhead and boilerplate code of interfacing between the different strategies.

For example, refactor KernelInit from unique_ptr<KernelState>(KernelContext*, KernelInitArgs) to Result<unique_ptr<KernelState>>(ExecContext*, KernelInitiArgs)

Reporter: Ben Kietzman / @bkietz

PRs and other links:

Note: This issue was originally created as ARROW-11990. 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