Skip to content

[C++][Python] Floordiv compute kernel #39386

Description

@rohanjain101

Describe the enhancement requested

Python and numpy support floor division, which for integral types, round towards infinity (pa.compute.divide for integral types rounds towards 0). If one of the types if floating point, then floordiv is equivalent to pa.compute.floor(pa.compute.divide), however, if both types are integral, floordiv should round towards infinity instead of 0. To do this currently, requires a combination of multiple compute calls, such as in pandas-dev/pandas#56677. Since python and numpy support this, would be useful to have this logic in an arrow compute kernel.

Component(s)

C++, Python

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions