From e6a5172a82ff5b78118455a1c084f8e888b18b0b Mon Sep 17 00:00:00 2001 From: Raj Bhatt Date: Wed, 25 Nov 2026 15:18:21 +0000 Subject: [PATCH 1/4] MINOR: Add missing compute functions to docs --- docs/source/cpp/compute.rst | 13 +++++++++++++ docs/source/python/api/compute.rst | 1 + 2 files changed, 14 insertions(+) diff --git a/docs/source/cpp/compute.rst b/docs/source/cpp/compute.rst index a328d7d07655..ceeb071c22c8 100644 --- a/docs/source/cpp/compute.rst +++ b/docs/source/cpp/compute.rst @@ -1016,6 +1016,8 @@ String transforms +-------------------------+--------+-----------------------------------------+------------------------+-----------------------------------+-------+ | utf8_lower | Unary | String-like | String-like | | \(9) | +-------------------------+--------+-----------------------------------------+------------------------+-----------------------------------+-------+ +| utf8_normalize | Unary | String-like | String-like | :struct:`Utf8NormalizeOptions` | | ++-------------------------+--------+-----------------------------------------+------------------------+-----------------------------------+-------+ | utf8_replace_slice | Unary | String-like | String-like | :struct:`ReplaceSliceOptions` | \(7) | +-------------------------+--------+-----------------------------------------+------------------------+-----------------------------------+-------+ | utf8_reverse | Unary | String-like | String-like | | \(11) | @@ -1431,6 +1433,13 @@ provided by a concrete function :func:`~arrow::compute::Cast`. +-----------------+------------+--------------------+------------------+--------------------------------+-------+ | cast | Unary | Many | Variable | :struct:`CastOptions` | | +-----------------+------------+--------------------+------------------+--------------------------------+-------+ +| run_end_decode | Unary | Run-end encoded | Input type | | | ++-----------------+------------+--------------------+------------------+--------------------------------+-------+ +| run_end_encode | Unary | Boolean, Null, | Run-end encoded | :struct:`RunEndEncodeOptions` | | +| | | Numeric, Temporal, | | | | +| | | Binary-, String- | | | | +| | | and Nested types | | | | ++-----------------+------------+--------------------+------------------+--------------------------------+-------+ | strftime | Unary | Temporal | String | :struct:`StrftimeOptions` | \(1) | +-----------------+------------+--------------------+------------------+--------------------------------+-------+ | strptime | Unary | String-like | Timestamp | :struct:`StrptimeOptions` | | @@ -1798,6 +1807,8 @@ Associative transforms | dictionary_encode | Unary | Boolean, Null, Numeric, | Dictionary | \(1) | | | | Temporal, Binary- and String-like | | | +-------------------+-------+-----------------------------------+-------------+-------+ +| dictionary_decode | Unary | Dictionary | Input type | \(4) | ++-------------------+-------+-----------------------------------+-------------+-------+ | unique | Unary | Boolean, Null, Numeric, | Input type | \(2) | | | | Temporal, Binary- and String-like | | | +-------------------+-------+-----------------------------------+-------------+-------+ @@ -1815,6 +1826,8 @@ Associative transforms Each output element corresponds to a unique value in the input, along with the number of times this value has appeared. +* \(4) If the input is not a Dictionary array, it is returned unchanged. + Selections ~~~~~~~~~~ diff --git a/docs/source/python/api/compute.rst b/docs/source/python/api/compute.rst index 43bcd0479ce5..f9c8f5947bc5 100644 --- a/docs/source/python/api/compute.rst +++ b/docs/source/python/api/compute.rst @@ -553,6 +553,7 @@ Sorts and Partitions rank_normal rank_quantile select_k_unstable + search_sorted sort_indices top_k_unstable From 5e4a488305d2d5f00eb72b38e32b8b2c76e3d891 Mon Sep 17 00:00:00 2001 From: Raj Bhatt Date: Sat, 28 Nov 2026 09:44:27 +0000 Subject: [PATCH 2/4] GH-55762: Update missing compute function documentation --- docs/source/cpp/compute.rst | 35 ++++++++++++------------------ docs/source/python/api/compute.rst | 3 ++- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/docs/source/cpp/compute.rst b/docs/source/cpp/compute.rst index ceeb071c22c8..f7eb865c4ecd 100644 --- a/docs/source/cpp/compute.rst +++ b/docs/source/cpp/compute.rst @@ -1433,13 +1433,6 @@ provided by a concrete function :func:`~arrow::compute::Cast`. +-----------------+------------+--------------------+------------------+--------------------------------+-------+ | cast | Unary | Many | Variable | :struct:`CastOptions` | | +-----------------+------------+--------------------+------------------+--------------------------------+-------+ -| run_end_decode | Unary | Run-end encoded | Input type | | | -+-----------------+------------+--------------------+------------------+--------------------------------+-------+ -| run_end_encode | Unary | Boolean, Null, | Run-end encoded | :struct:`RunEndEncodeOptions` | | -| | | Numeric, Temporal, | | | | -| | | Binary-, String- | | | | -| | | and Nested types | | | | -+-----------------+------------+--------------------+------------------+--------------------------------+-------+ | strftime | Unary | Temporal | String | :struct:`StrftimeOptions` | \(1) | +-----------------+------------+--------------------+------------------+--------------------------------+-------+ | strptime | Unary | String-like | Timestamp | :struct:`StrptimeOptions` | | @@ -1801,20 +1794,20 @@ Statistical functions Associative transforms ~~~~~~~~~~~~~~~~~~~~~~ -+-------------------+-------+-----------------------------------+-------------+-------+ -| Function name | Arity | Input types | Output type | Notes | -+===================+=======+===================================+=============+=======+ -| dictionary_encode | Unary | Boolean, Null, Numeric, | Dictionary | \(1) | -| | | Temporal, Binary- and String-like | | | -+-------------------+-------+-----------------------------------+-------------+-------+ -| dictionary_decode | Unary | Dictionary | Input type | \(4) | -+-------------------+-------+-----------------------------------+-------------+-------+ -| unique | Unary | Boolean, Null, Numeric, | Input type | \(2) | -| | | Temporal, Binary- and String-like | | | -+-------------------+-------+-----------------------------------+-------------+-------+ -| value_counts | Unary | Boolean, Null, Numeric, | Input type | \(3) | -| | | Temporal, Binary- and String-like | | | -+-------------------+-------+-----------------------------------+-------------+-------+ ++-------------------+-------+-----------------------------------+-------------+------------------------------------+-------+ +| Function name | Arity | Input types | Output type | Options class | Notes | ++===================+=======+===================================+=============+====================================+=======+ +| dictionary_encode | Unary | Boolean, Null, Numeric, | Dictionary | :struct:`DictionaryEncodeOptions` | \(1) | +| | | Temporal, Binary- and String-like | | | | ++-------------------+-------+-----------------------------------+-------------+------------------------------------+-------+ +| dictionary_decode | Unary | Dictionary | Input type | | \(4) | ++-------------------+-------+-----------------------------------+-------------+------------------------------------+-------+ +| unique | Unary | Boolean, Null, Numeric, | Input type | | \(2) | +| | | Temporal, Binary- and String-like | | | | ++-------------------+-------+-----------------------------------+-------------+------------------------------------+-------+ +| value_counts | Unary | Boolean, Null, Numeric, | Input type | | \(3) | +| | | Temporal, Binary- and String-like | | | | ++-------------------+-------+-----------------------------------+-------------+------------------------------------+-------+ * \(1) Output is ``Dictionary(Int32, input type)``. It is a no-op if input is already a Dictionary array. diff --git a/docs/source/python/api/compute.rst b/docs/source/python/api/compute.rst index f9c8f5947bc5..f150975ab714 100644 --- a/docs/source/python/api/compute.rst +++ b/docs/source/python/api/compute.rst @@ -552,8 +552,8 @@ Sorts and Partitions rank rank_normal rank_quantile - select_k_unstable search_sorted + select_k_unstable sort_indices top_k_unstable @@ -638,6 +638,7 @@ Compute Options RunEndEncodeOptions ScalarAggregateOptions ScatterOptions + SearchSortedOptions SelectKOptions SetLookupOptions SkewOptions From 68456ae627d185ef9564160bafbb223677a7cce3 Mon Sep 17 00:00:00 2001 From: Raj Bhatt Date: Tue, 1 Dec 2026 13:13:32 +0000 Subject: [PATCH 3/4] GH-55762: Correct compute function documentation --- docs/source/cpp/compute.rst | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/docs/source/cpp/compute.rst b/docs/source/cpp/compute.rst index f7eb865c4ecd..23aba51de6e0 100644 --- a/docs/source/cpp/compute.rst +++ b/docs/source/cpp/compute.rst @@ -1794,20 +1794,27 @@ Statistical functions Associative transforms ~~~~~~~~~~~~~~~~~~~~~~ -+-------------------+-------+-----------------------------------+-------------+------------------------------------+-------+ -| Function name | Arity | Input types | Output type | Options class | Notes | -+===================+=======+===================================+=============+====================================+=======+ -| dictionary_encode | Unary | Boolean, Null, Numeric, | Dictionary | :struct:`DictionaryEncodeOptions` | \(1) | -| | | Temporal, Binary- and String-like | | | | -+-------------------+-------+-----------------------------------+-------------+------------------------------------+-------+ -| dictionary_decode | Unary | Dictionary | Input type | | \(4) | -+-------------------+-------+-----------------------------------+-------------+------------------------------------+-------+ -| unique | Unary | Boolean, Null, Numeric, | Input type | | \(2) | -| | | Temporal, Binary- and String-like | | | | -+-------------------+-------+-----------------------------------+-------------+------------------------------------+-------+ -| value_counts | Unary | Boolean, Null, Numeric, | Input type | | \(3) | -| | | Temporal, Binary- and String-like | | | | -+-------------------+-------+-----------------------------------+-------------+------------------------------------+-------+ ++-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ +| Function name | Arity | Input types | Output type | Options class | Notes | ++===================+=======+======================================+====================+===================================+=======+ +| dictionary_encode | Unary | Boolean, Null, Numeric, | Dictionary | :struct:`DictionaryEncodeOptions` | \(1) | +| | | Temporal, Binary- and String-like | | | | ++-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ +| dictionary_decode | Unary | Dictionary | Value type | | \(4) | ++-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ +| run_end_encode | Unary | Boolean, Null, Numeric, | Run-end encoded | :struct:`RunEndEncodeOptions` | | +| | | Temporal, Binary- and String-like, | | | | +| | | FixedSizeList, List, LargeList, | | | | +| | | ListView, LargeListView, Map, Struct | | | | ++-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ +| run_end_decode | Unary | Run-end encoded | Encoded value type | | | ++-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ +| unique | Unary | Boolean, Null, Numeric, | Input type | | \(2) | +| | | Temporal, Binary- and String-like | | | | ++-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ +| value_counts | Unary | Boolean, Null, Numeric, | Input type | | \(3) | +| | | Temporal, Binary- and String-like | | | | ++-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ * \(1) Output is ``Dictionary(Int32, input type)``. It is a no-op if input is already a Dictionary array. From d258358372535fb311c879ad4f4c98853afb7298 Mon Sep 17 00:00:00 2001 From: Raj Bhatt Date: Tue, 1 Dec 2026 18:02:00 +0000 Subject: [PATCH 4/4] GH-55762: Update compute function documentation --- docs/source/cpp/compute.rst | 50 ++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/docs/source/cpp/compute.rst b/docs/source/cpp/compute.rst index 23aba51de6e0..533703b51b05 100644 --- a/docs/source/cpp/compute.rst +++ b/docs/source/cpp/compute.rst @@ -1016,7 +1016,7 @@ String transforms +-------------------------+--------+-----------------------------------------+------------------------+-----------------------------------+-------+ | utf8_lower | Unary | String-like | String-like | | \(9) | +-------------------------+--------+-----------------------------------------+------------------------+-----------------------------------+-------+ -| utf8_normalize | Unary | String-like | String-like | :struct:`Utf8NormalizeOptions` | | +| utf8_normalize | Unary | String-like | String-like | :struct:`Utf8NormalizeOptions` | \(12) | +-------------------------+--------+-----------------------------------------+------------------------+-----------------------------------+-------+ | utf8_replace_slice | Unary | String-like | String-like | :struct:`ReplaceSliceOptions` | \(7) | +-------------------------+--------+-----------------------------------------+------------------------+-----------------------------------+-------+ @@ -1070,6 +1070,9 @@ String transforms If the input is not valid UTF8, then the output is undefined (but the size of output buffers will be preserved). +* \(12) Normalize each UTF8-encoded string to the Unicode normalization form + as specified in the required :struct:`Utf8NormalizeOptions`. + String padding ~~~~~~~~~~~~~~ @@ -1794,27 +1797,27 @@ Statistical functions Associative transforms ~~~~~~~~~~~~~~~~~~~~~~ -+-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ -| Function name | Arity | Input types | Output type | Options class | Notes | -+===================+=======+======================================+====================+===================================+=======+ -| dictionary_encode | Unary | Boolean, Null, Numeric, | Dictionary | :struct:`DictionaryEncodeOptions` | \(1) | -| | | Temporal, Binary- and String-like | | | | -+-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ -| dictionary_decode | Unary | Dictionary | Value type | | \(4) | -+-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ -| run_end_encode | Unary | Boolean, Null, Numeric, | Run-end encoded | :struct:`RunEndEncodeOptions` | | -| | | Temporal, Binary- and String-like, | | | | -| | | FixedSizeList, List, LargeList, | | | | -| | | ListView, LargeListView, Map, Struct | | | | -+-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ -| run_end_decode | Unary | Run-end encoded | Encoded value type | | | -+-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ -| unique | Unary | Boolean, Null, Numeric, | Input type | | \(2) | -| | | Temporal, Binary- and String-like | | | | -+-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ -| value_counts | Unary | Boolean, Null, Numeric, | Input type | | \(3) | -| | | Temporal, Binary- and String-like | | | | -+-------------------+-------+--------------------------------------+--------------------+-----------------------------------+-------+ ++-------------------+-------+--------------------------------------+-----------------------+-----------------------------------+-------+ +| Function name | Arity | Input types | Output type | Options class | Notes | ++===================+=======+======================================+=======================+===================================+=======+ +| dictionary_encode | Unary | Boolean, Null, Numeric, | Dictionary | :struct:`DictionaryEncodeOptions` | \(1) | +| | | Temporal, Binary- and String-like | | | | ++-------------------+-------+--------------------------------------+-----------------------+-----------------------------------+-------+ +| dictionary_decode | Unary | Dictionary | Dictionary value type | | \(4) | ++-------------------+-------+--------------------------------------+-----------------------+-----------------------------------+-------+ +| run_end_encode | Unary | Boolean, Null, Numeric, | Run-end encoded | :struct:`RunEndEncodeOptions` | | +| | | Temporal, Binary- and String-like, | | | | +| | | FixedSizeList, List, LargeList, | | | | +| | | ListView, LargeListView, Map, Struct | | | | ++-------------------+-------+--------------------------------------+-----------------------+-----------------------------------+-------+ +| run_end_decode | Unary | Run-end encoded | Encoded value type | | | ++-------------------+-------+--------------------------------------+-----------------------+-----------------------------------+-------+ +| unique | Unary | Boolean, Null, Numeric, | Input type | | \(2) | +| | | Temporal, Binary- and String-like | | | | ++-------------------+-------+--------------------------------------+-----------------------+-----------------------------------+-------+ +| value_counts | Unary | Boolean, Null, Numeric, | Input type | | \(3) | +| | | Temporal, Binary- and String-like | | | | ++-------------------+-------+--------------------------------------+-----------------------+-----------------------------------+-------+ * \(1) Output is ``Dictionary(Int32, input type)``. It is a no-op if input is already a Dictionary array. @@ -1826,7 +1829,8 @@ Associative transforms Each output element corresponds to a unique value in the input, along with the number of times this value has appeared. -* \(4) If the input is not a Dictionary array, it is returned unchanged. +* \(4) Dictionary-encoded arrays and chunked arrays are decoded to their + value type. Non-dictionary inputs are returned unchanged. Selections ~~~~~~~~~~