Skip to content

Commit 720dcbe

Browse files
authored
GH-49745: [Docs][Python] Fix doctests failure in substrait.rst (#49754)
### Rationale for this change The [Python / AMD64 Conda Python 3.11 Sphinx & Numpydoc](https://github.com/apache/arrow/actions/runs/24404394331/job/71295731710?pr=49742) job is failing due to the version number change. ### What changes are included in this PR? - Use ellipsis so that all version-dependent bytes are covered. - Add `docs/source/python/**` to the python workflow path triggers to run Sphinx & Numpydoc CI on documentation changes. ### Are these changes tested? Yes, with Conda Python 3.11 Sphinx & Numpydoc job. ### Are there any user-facing changes? No. * GitHub Issue: #49745 Authored-by: AlenkaF <frim.alenka@gmail.com> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
1 parent d2c2f00 commit 720dcbe

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/python.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ on:
3030
- 'ci/**'
3131
- 'cpp/**'
3232
- 'compose.yaml'
33+
- 'docs/source/python/**'
3334
- 'python/**'
3435
pull_request:
3536
paths:
@@ -38,6 +39,7 @@ on:
3839
- 'ci/**'
3940
- 'cpp/**'
4041
- 'compose.yaml'
42+
- 'docs/source/python/**'
4143
- 'python/**'
4244

4345
concurrency:

docs/source/python/integration/substrait.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ all the extensions types:
5959
.. code-block:: python
6060
6161
>>> print(bytes(substrait_schema.expression))
62-
b'"\x14\n\x01x\n\x01y\x12\x0c\n\x04*\x02\x10\x01\n\x04b\x02\x10\x01:\x19\x10,*\x15Acero ...'
62+
b'"\x14\n\x01x\n\x01y\x12\x0c\n\x04*\x02\x10\x01\n\x04b\x02\x10\x01:...'
6363
6464
If ``Substrait Python`` is installed, the schema can also be converted to
6565
a ``substrait-python`` object:
@@ -114,7 +114,7 @@ protobuf ``ExtendedExpression`` message data itself:
114114
.. code-block:: python
115115
116116
>>> print(bytes(substrait_expr))
117-
b'\nZ\x12Xhttps://github.com/substrait-io/substrait/blob/main/extensions/functions_arithmetic.yaml\x12\x07\x1a\x05\x1a\x03add\x1a>\n5\x1a3\x1a\x04*\x02\x10\x01"\n\x1a\x08\x12\x06\n\x02\x12\x00"\x00"\x0c\x1a\n\x12\x08\n\x04\x12\x02\x08\x01"\x00*\x11\n\x08overflow\x12\x05ERROR\x1a\x05total"\x14\n\x01x\n\x01y\x12\x0c\n\x04*\x02\x10\x01\n\x04*\x02\x10\x01:\x19\x10,*\x15Acero ...'
117+
b'\nZ\x12Xhttps://github.com/substrait-io/substrait/blob/main/extensions/functions_arithmetic.yaml\x12\x07\x1a\x05\x1a\x03add\x1a>\n5\x1a3\x1a\x04*\x02\x10\x01"\n\x1a\x08\x12\x06\n\x02\x12\x00"\x00"\x0c\x1a\n\x12\x08\n\x04\x12\x02\x08\x01"\x00*\x11\n\x08overflow\x12\x05ERROR\x1a\x05total"\x14\n\x01x\n\x01y\x12\x0c\n\x04*\x02\x10\x01\n\x04*\x02\x10\x01:...'
118118
119119
So in case a ``Substrait Python`` object is required, the expression
120120
has to be decoded from ``substrait-python`` itself:

0 commit comments

Comments
 (0)