Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

1 Not supported for the current status
Status Submitted
Created by Guest
Created on Jan 21, 2025
Merged feedback
This feedback has been merged into another feedback item To comment or vote on this feedback, please visit CUSTOMER-I-8357 pymongoarrow replaces existing codecs.

pymongoarrow replaces existing codecs Merged

The api.write() method replaces any existing codecs. The collection TypeRegistry is replaced with a new instance, effectively removing any existing custom codecs. https://github.com/mongodb-labs/mongo-arrow/blob/1.6.0/bindings/python/pymongoarrow/api.py#L419 A related issue is that pymongoarrow uses pyarrow.to_pylist() to convert a pyarrow.Table to Python objects as an intermediate step before converting them to raw BSON. Pyarrow converts Arrow decimal128 types to Python Decimal objects. However, BSON cannot handle Decimal types, necessitating the use of a custom codec. https://github.com/mongodb-labs/mongo-arrow/blob/1.6.0/bindings/python/pymongoarrow/api.py#L385