Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does mongo-arrow provide real zero copy in the chain mongodb->arrow->pandas? #176

Open
sergun opened this issue Nov 7, 2023 · 3 comments
Labels

Comments

@sergun
Copy link

sergun commented Nov 7, 2023

.. or zero copy appear only between arrow->pandas but not here mongodb->arrow?

In other words are arrow data types used in mongodb?

@ShaneHarvey
Copy link
Collaborator

The MongoDB -> Arrow portion is not zero copy. This library translates (copies) MongoDB's BSON document result structure into Arrow's data format. There are no native Arrow types in MongoDB. Alternatively, the app can store Arrow data as opaque BSON binary data in MongoDB but then the app looses the ability to query the data.

@sergun
Copy link
Author

sergun commented Nov 7, 2023

The MongoDB -> Arrow portion is not zero copy. This library translates (copies) MongoDB's BSON document result structure into Arrow's data format. There are no native Arrow types in MongoDB. Alternatively, the app can store Arrow data as opaque BSON binary data in MongoDB but then the app looses the ability to query the data.

Thanks a lot!
Do you know if there are plans to make something like Arrow backend in MongoDB to store all documents internally in Arrow structures as it was made in pandas 2.x and in Spark?

PS. My original question was caused by use case of batch processing of data stored in MongoDB by logic expressed in pandas. Try to find some light-weight alternative to popular solution like Spark+pandas_udf (which uses Arrow end-to-end: Spark->Arrow->pandas).

@blink1073
Copy link
Member

Hi @sergun, following up, no, there are no plans to change the storage format on MongoDB for alternate formats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants