Uploaded image for project: 'pymongoarrow'
  1. pymongoarrow
  2. ARROW-175

Incorrect projection on nested fields

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.2
    • Affects Version/s: None
    • Component/s: None
    • None

      As reported in https://github.com/mongodb-labs/mongo-arrow/issues/164, pymongoarrow produces incorrect projections on nested fields which cab lead to unexpected errors.

      >>> import pymongoarrow.api
      >>> import pyarrow as pa
      >>> schema = pymongoarrow.api.Schema({'_id': pa.int32(), 'obj': {'a': pa.int32()}})
      >>> schema._get_projection()
      {'_id': True, 'obj': True}
      

      The expected behavior should be:

      >>> schema._get_projection()
      {'_id': True, 'obj': {'a': True}}
      

            Assignee:
            noah.stapp@mongodb.com Noah Stapp
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: