Basic Joins - left outer join

I’ve exported the pipeline from the Basic Joins lecture and am running it locally. It appears that the expressive $lookup is producing a left outer join. Am I seeing things, is my query wrong, or is that simply unstated in this lecture? I believe the regular $lookup does a left outer join.

I am executing this from python shell in my terminal.

Here is my code

result = client['sample_mflix']['movies'].aggregate([
    {
        '$match': {
            'year': {
                '$gte': 1980,
                '$lt': 1990
            }
        }
    }, {
        '$lookup': {
            'from': 'comments',
            'let': {
                'mid': '$_id'
            },
            'pipeline': [
                {
                    '$match': {
                        '$expr': {
                            '$eq': [
                                '$movie_id', '$$mid'
                            ]
                        }
                    }
                }, {
                    '$count': 'count'
                }
            ],
            'as': 'movie_comments'
        }
    },
    {
      "$project": {
        "title": 1,
        "movie_comments": 1
      }
    },
    {
      "$limit": 10
    }
])
print(dumps(result, indent=2))

And the results:

[
  {
    "_id": {
      "$oid": "573a1394f29313caabce03f0"
    },
    "title": "Zhu Fu",
    "movie_comments": [
      {
        "count": 1
      }
    ]
  },
  {
    "_id": {
      "$oid": "573a1395f29313caabce328c"
    },
    "title": "Rece do g\u00e8ry",
    "movie_comments": []
  },
  {
    "_id": {
      "$oid": "573a1396f29313caabce3c5a"
    },
    "title": "The Plot Against Harry",
    "movie_comments": []
  },
  {
    "_id": {
      "$oid": "573a1397f29313caabce6731"
    },
    "title": "Who's Singin' Over There?",
    "movie_comments": []
  },
  {
    "_id": {
      "$oid": "573a1397f29313caabce7030"
    },
    "title": "Pride and Prejudice",
    "movie_comments": [
      {
        "count": 1
      }
    ]
  },
  {
    "_id": {
      "$oid": "573a1397f29313caabce717e"
    },
    "title": "The Cuenca Crime",
    "movie_comments": []
  },
  {
    "_id": {
      "$oid": "573a1397f29313caabce7282"
    },
    "title": "Saturn 3",
    "movie_comments": []
  },
  {
    "_id": {
      "$oid": "573a1397f29313caabce73a1"
    },
    "title": "Moscow Does Not Believe in Tears",
    "movie_comments": [
      {
        "count": 1
      }
    ]
  },
  {
    "_id": {
      "$oid": "573a1397f29313caabce73d3"
    },
    "title": "Oblomov",
    "movie_comments": [
      {
        "count": 1
      }
    ]
  },
  {
    "_id": {
      "$oid": "573a1397f29313caabce74a3"
    },
    "title": "Fun Is Beautiful",
    "movie_comments": []
  }
]

Note movies appear in the cursor that don’t have comments in them.

That is right!

Kanika