You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ap...@apache.org on 2023/05/23 16:13:05 UTC

[arrow] branch main updated: MINOR: [Docs][C++] Improve Input Shapes section of Compute doc (#35720)

This is an automated email from the ASF dual-hosted git repository.

apitrou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 6d3d2fca2c MINOR: [Docs][C++] Improve Input Shapes section of Compute doc (#35720)
6d3d2fca2c is described below

commit 6d3d2fca2c9693231fa1e52c142ceef563fc23f9
Author: Jin Shang <sh...@gmail.com>
AuthorDate: Wed May 24 00:12:51 2023 +0800

    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 <sh...@gmail.com>
    Signed-off-by: Antoine Pitrou <an...@python.org>
---
 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 57fa2fd0cc..7a8aa67a0d 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: