Recall & Review
beginner
What is an inner join in Apache Spark?
An inner join returns only the rows that have matching keys in both DataFrames. It is like finding common friends between two groups.
Click to reveal answer
beginner
Explain a left outer join in simple terms.
A left outer join returns all rows from the left DataFrame and the matching rows from the right DataFrame. If there is no match, the right side will have null values.
Click to reveal answer
beginner
What does a right outer join do?
A right outer join returns all rows from the right DataFrame and the matching rows from the left DataFrame. If no match exists, the left side will have null values.
Click to reveal answer
beginner
Describe a full outer join.
A full outer join returns all rows from both DataFrames. When there is no match, the missing side will have null values. It combines left and right joins.
Click to reveal answer
intermediate
What is the difference between inner join and full outer join?
Inner join returns only matching rows from both DataFrames. Full outer join returns all rows from both DataFrames, filling nulls where there is no match.
Click to reveal answer
Which join returns only rows with matching keys in both DataFrames?
✗ Incorrect
Inner join returns only rows where keys match in both DataFrames.
In a left outer join, what happens if a row in the left DataFrame has no match in the right DataFrame?
✗ Incorrect
Left outer join keeps all left rows, filling nulls for unmatched right rows.
Which join returns all rows from the right DataFrame and matching rows from the left?
✗ Incorrect
Right outer join returns all right rows and matches from left.
What does a full outer join return?
✗ Incorrect
Full outer join returns all rows from both sides, filling nulls where no match.
If you want to keep only rows present in both DataFrames, which join do you use?
✗ Incorrect
Inner join keeps only rows with keys in both DataFrames.
Explain the difference between inner join, left outer join, right outer join, and full outer join in Apache Spark.
Think about which side's rows are always kept and how unmatched rows are handled.
You got /4 concepts.
Describe a real-life example where you would use a left outer join versus a full outer join.
Consider situations where you want to keep all from one list or all from both.
You got /3 concepts.