Skip to content

Navigation Menu

Sign in
Sign up

[Python] get_partition_keys segfaults when the partition expression is None #51293

Open
Assignees

Description

Describe the bug, including details regarding any error messages, version, and platform.

pyarrow.dataset.get_partition_keys takes an Expression but does not reject
None, so passing it dereferences a null pointer and terminates the interpreter
rather than raising.

import pyarrow.dataset as ds
ds.get_partition_keys(None)
$ python -c "import pyarrow.dataset as ds; ds.get_partition_keys(None)"; echo "exit=$?"
Bus error: 10
exit=138

The same call through the private alias ds._get_partition_keys(None) crashes
identically.

This is the same class of problem as GH-51042 and GH-51043, where a required
Arrow wrapper argument was not declared not None at the Cython boundary. A
sweep of the remaining Cython bindings for required wrapper-typed parameters
without not None found this as the one still reachable from a public entry
point.

Expected behavior is a TypeError, consistent with other typed PyArrow APIs.

PyArrow 25.0.1, CPython 3.11, macOS arm64.

Component(s)

Python

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    AltStyle によって変換されたページ (->オリジナル) /