mongo-arrow
mongo-arrow copied to clipboard
objectID in nested field raises when using aggregate_polars_all
trafficstars
Hi,
I really appreciate the support for polars, but
collection.insert_one({'obj': {'data_to_test': bson.ObjectId()}})
pymongoarrow.api.aggregate_polars_all(collection, [],
schema=pymongoarrow.api.Schema({'obj': {'data_to_test': bson.ObjectId}}))
raises with polars.exceptions.ComputeError: cannot create series from Extension("pymongoarrow.objectid", FixedSizeBinary(12), Some("")) as the casting of FixedSizeBinary is not done for nested fields.
Ps.: For not nested fields it works fine. Loading the arrow data frame also works fine. So this is not a showstopper, but it prohibits from using the aggregate_polars_all convenience function.
See #220 for a fix
Should this be closed now that #220 is merged?
@ShaneHarvey yes