-
Type: New Feature
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Python Drivers
-
Not Needed
-
Context
When struct is put inside a list
{{schema = pymongoarrow.api.Schema(Unknown macro: {'_id'})}}
it raises
{{> raise ValueError(msg)
E ValueError: Unsupported type identifier <class 'pyarrow.lib.StructType'> for field 0}}
As the case for lists in the function _normalize_typeid exists, then it seems that it should be supported, but there is a bug.Expected behavior:
{{<SchemaUnknown macro: {'_id'}>}}
See #223 for a fix.Further problem is setting bson.ObjectId inside the struct inside the list
{{schema = pymongoarrow.api.Schema(Unknown macro: {'_id'})}}
which raises a TypeError:
{{_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyarrow/types.pxi:4711: in pyarrow.lib.struct
???
pyarrow/types.pxi:3417: in pyarrow.lib.field
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _> ???
E TypeError: DataType expected, got <class 'type'>pyarrow/types.pxi:5066: TypeError}}
It is fine in the case of list of only bson.ObjectId:
{{schema = pymongoarrow.api.Schema(Unknown macro: {'_id'})
->
<SchemaUnknown macro: {'_id'}>}}
Definition of done
What must be done to consider the task complete?
Bugfix supplied
Test to confirm bug will not recur supplied
Pitfalls
What should the implementer watch out for? What are the risks?