You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MongoDB behavior is to clean the 'out' collection, before filling it with the map_reduce results.
The current mongomock behavior results in adding subsequent map-reduce calls results to the same output collection, if the collection name is reused.
I believe that the fix is to add 'out_collection.drop()' in the following block of code in collection.py:
if isinstance(out, (str, bytes)):
out_collection = getattr(self._Collection__database, out)
out_collection.drop()
out_collection.insert(reduced_rows)
The text was updated successfully, but these errors were encountered:
MongoDB behavior is to clean the 'out' collection, before filling it with the map_reduce results.
The current mongomock behavior results in adding subsequent map-reduce calls results to the same output collection, if the collection name is reused.
I believe that the fix is to add 'out_collection.drop()' in the following block of code in collection.py:
The text was updated successfully, but these errors were encountered: