Skip to content

Commit

Permalink
MINOR: [Docs][C++] Improve Input Shapes section of Compute doc (apach…
Browse files Browse the repository at this point in the history
…e#35720)

1.  The function that only takes arrays should be `array_sort_indices`, not `sort_indices`.
2. IMO The word `either` implies that `array_sort_indices` also accepts chunked arrays but in fact it doesn't. So I changed `either` to `particular input types`.
3. There are no mention of two dimensional data types, i.e. RecordBatch and Table, throughout the Input Shapes section, which I feel like is a miss. So I added `sort_indices` as an example for them.

Authored-by: Jin Shang <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
  • Loading branch information
js8544 authored May 23, 2023
1 parent ce095e4 commit 6d3d2fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/source/cpp/compute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ Computation inputs are represented as a general :class:`Datum` class,
which is a tagged union of several shapes of data such as :class:`Scalar`,
:class:`Array` and :class:`ChunkedArray`. Many compute functions support
both array (chunked or not) and scalar inputs, however some will mandate
either. For example, while ``sort_indices`` requires its first and only
input to be an array.
particular input types. For example, while ``array_sort_indices`` requires its
first and only input to be an array, the generalized ``sort_indices``
function accepts an array, chunked array, record batch or table.

.. _invoking-compute-functions:

Expand Down

0 comments on commit 6d3d2fc

Please sign in to comment.