Skip to content

[Python] Mappings that implement __arrow_c_schema__ never have their method invoked #43388

@cpcloud

Description

@cpcloud

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

The implementation of pyarrow.schema doesn't allow objects that are Mappings to take advantage of __arrow_c_schema__ because Mapping is checked before __arrow_c_schema__ is checked.

This seems like a bug considering that custom schema objects naturally fit into the Mapping concept.

Would it make sense to swap the order here and first check for __arrow_c_schema__ and then check whether an object is a mapping?

Component(s)

Python

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions