From 6d3d2fca2c9693231fa1e52c142ceef563fc23f9 Mon Sep 17 00:00:00 2001 From: Jin Shang Date: Wed, 24 May 2023 00:12:51 +0800 Subject: [PATCH] MINOR: [Docs][C++] Improve Input Shapes section of Compute doc (#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 Signed-off-by: Antoine Pitrou --- docs/source/cpp/compute.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/source/cpp/compute.rst b/docs/source/cpp/compute.rst index 57fa2fd0cc2fa..7a8aa67a0d7f1 100644 --- a/docs/source/cpp/compute.rst +++ b/docs/source/cpp/compute.rst @@ -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: