Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions pyarrow-stubs/compute.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ from pyarrow._compute import register_aggregate_function as register_aggregate_f
from pyarrow._compute import register_scalar_function as register_scalar_function
from pyarrow._compute import register_tabular_function as register_tabular_function
from pyarrow._compute import register_vector_function as register_vector_function

from pyarrow._compute import _Order, _Placement
from pyarrow._stubs_typing import ArrayLike, ScalarLike
from . import lib

Expand Down Expand Up @@ -2617,19 +2619,19 @@ def indices_nonzero(
def array_sort_indices(
array: lib.Array | lib.ChunkedArray,
/,
order: Literal["ascending", "descending"] = "ascending",
order: _Order = "ascending",
*,
null_placement: Literal["at_start", "at_end"] = "at_end",
null_placement: _Placement = "at_end",
options: ArraySortOptions | None = None,
memory_pool: lib.MemoryPool | None = None,
) -> lib.UInt64Array: ...
@overload
def array_sort_indices(
array: Expression,
/,
order: Literal["ascending", "descending"] = "ascending",
order: _Order = "ascending",
*,
null_placement: Literal["at_start", "at_end"] = "at_end",
null_placement: _Placement = "at_end",
options: ArraySortOptions | None = None,
memory_pool: lib.MemoryPool | None = None,
) -> Expression: ...
Expand All @@ -2639,7 +2641,7 @@ def partition_nth_indices(
/,
pivot: int,
*,
null_placement: Literal["at_start", "at_end"] = "at_end",
null_placement: _Placement = "at_end",
options: PartitionNthOptions | None = None,
memory_pool: lib.MemoryPool | None = None,
) -> lib.UInt64Array: ...
Expand All @@ -2649,16 +2651,16 @@ def partition_nth_indices(
/,
pivot: int,
*,
null_placement: Literal["at_start", "at_end"] = "at_end",
null_placement: _Placement = "at_end",
options: PartitionNthOptions | None = None,
memory_pool: lib.MemoryPool | None = None,
) -> Expression: ...
def rank(
input: lib.Array | lib.ChunkedArray,
/,
sort_keys: Literal["ascending", "descending"] = "ascending",
sort_keys: _Order = "ascending",
*,
null_placement: Literal["at_start", "at_end"] = "at_end",
null_placement: _Placement = "at_end",
tiebreaker: Literal["min", "max", "first", "dense"] = "first",
options: RankOptions | None = None,
memory_pool: lib.MemoryPool | None = None,
Expand All @@ -2668,7 +2670,7 @@ def select_k_unstable(
input: lib.Array | lib.ChunkedArray,
/,
k: int,
sort_keys: list[tuple[str, Literal["ascending", "descending"]]],
sort_keys: list[tuple[str, _Order]],
*,
options: SelectKOptions | None = None,
memory_pool: lib.MemoryPool | None = None,
Expand All @@ -2678,7 +2680,7 @@ def select_k_unstable(
input: Expression,
/,
k: int,
sort_keys: list[tuple[str, Literal["ascending", "descending"]]],
sort_keys: list[tuple[str, _Order]],
*,
options: SelectKOptions | None = None,
memory_pool: lib.MemoryPool | None = None,
Expand All @@ -2687,19 +2689,19 @@ def select_k_unstable(
def sort_indices(
input: lib.Array | lib.ChunkedArray | lib.RecordBatch | lib.Table,
/,
sort_keys: Sequence[tuple[str, Literal["ascending", "descending"]]],
sort_keys: Sequence[tuple[str, _Order]] = (),
*,
null_placement: Literal["at_start", "at_end"] = "at_end",
null_placement: _Placement = "at_end",
options: SortOptions | None = None,
memory_pool: lib.MemoryPool | None = None,
) -> lib.UInt64Array: ...
@overload
def sort_indices(
input: Expression,
/,
sort_keys: Sequence[tuple[str, Literal["ascending", "descending"]]],
sort_keys: Sequence[tuple[str, _Order]] = (),
*,
null_placement: Literal["at_start", "at_end"] = "at_end",
null_placement: _Placement = "at_end",
options: SortOptions | None = None,
memory_pool: lib.MemoryPool | None = None,
) -> Expression: ...
Expand Down