title: Why there is always a .collect() after a .distinct()?
body: <p>Beginner for spark. Often see .distinct().collect() structure. What might be the intrinsic reason to have the collect() function right after the distinct() function?</p>