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

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


The following commit(s) were added to refs/heads/master by this push:
     new 177a0d4400 GH-34011: [Python][Doc] Add pyarrow.substrait to pyarrow's 
API reference docs (#34012)
177a0d4400 is described below

commit 177a0d4400e61f44dbd045ce05150bba28dd1d74
Author: Weston Pace <[email protected]>
AuthorDate: Fri Feb 3 00:40:10 2023 -0800

    GH-34011: [Python][Doc] Add pyarrow.substrait to pyarrow's API reference 
docs (#34012)
    
    
    * Closes: #34011
    
    Authored-by: Weston Pace <[email protected]>
    Signed-off-by: Joris Van den Bossche <[email protected]>
---
 docker-compose.yml                                |  1 +
 docs/source/python/api.rst                        |  1 +
 docs/source/python/{api.rst => api/substrait.rst} | 46 +++++++++++------------
 python/pyarrow/_substrait.pyx                     |  2 +-
 4 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/docker-compose.yml b/docker-compose.yml
index 6ea9005fef..21e73ce892 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1112,6 +1112,7 @@ services:
     image: ${REPO}:${ARCH}-conda-python-${PYTHON}-pandas-${PANDAS}
     environment:
       <<: *ccache
+      ARROW_SUBSTRAIT: "ON"
       LC_ALL: "C.UTF-8"
       LANG: "C.UTF-8"
       BUILD_DOCS_CPP: "ON"
diff --git a/docs/source/python/api.rst b/docs/source/python/api.rst
index 12cf4e0680..0ce120664d 100644
--- a/docs/source/python/api.rst
+++ b/docs/source/python/api.rst
@@ -28,6 +28,7 @@ API Reference
    api/arrays
    api/memory
    api/compute
+   api/substrait
    api/files
    api/tables
    api/ipc
diff --git a/docs/source/python/api.rst b/docs/source/python/api/substrait.rst
similarity index 70%
copy from docs/source/python/api.rst
copy to docs/source/python/api/substrait.rst
index 12cf4e0680..207b2d9cdb 100644
--- a/docs/source/python/api.rst
+++ b/docs/source/python/api/substrait.rst
@@ -15,26 +15,26 @@
 .. specific language governing permissions and limitations
 .. under the License.
 
-.. _api:
-
-*************
-API Reference
-*************
-
-.. toctree::
-   :maxdepth: 2
-
-   api/datatypes
-   api/arrays
-   api/memory
-   api/compute
-   api/files
-   api/tables
-   api/ipc
-   api/flight
-   api/formats
-   api/filesystems
-   api/dataset
-   api/plasma
-   api/cuda
-   api/misc
+.. _api.substrait:
+.. currentmodule:: pyarrow.substrait
+
+Substrait
+=========
+
+These functions allow you to execute Substrait plans against Arrow data
+
+Query Execution
+---------------
+
+.. autosummary::
+   :toctree: ../generated/
+
+   run_query
+
+Utility
+-------
+
+.. autosummary::
+   :toctree: ../generated/
+
+   get_supported_functions
\ No newline at end of file
diff --git a/python/pyarrow/_substrait.pyx b/python/pyarrow/_substrait.pyx
index da061d8cd3..8b2a89da27 100644
--- a/python/pyarrow/_substrait.pyx
+++ b/python/pyarrow/_substrait.pyx
@@ -110,7 +110,7 @@ def run_query(plan, *, table_provider=None, 
use_threads=True):
     ...         }
     ... '''
     >>> buf = pa._substrait._parse_json_plan(tobytes(substrait_query))
-    >>> reader = pa.substrait.run_query(buf, table_provider)
+    >>> reader = pa.substrait.run_query(buf, table_provider=table_provider)
     >>> reader.read_all()
     pyarrow.Table
     x: int64

Reply via email to