Incorrect projection on nested fields

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • pymongoarrrow-1.0.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Shane Harvey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: