Databricks Certified Associate Developer for Apache Spark — Question 112
Which of the following operations performs a cross join on two DataFrames?
Answer options
- A. DataFrame.join()
- B. The standalone join() function
- C. The standalone crossJoin() function
- D. DataFrame.crossJoin()
- E. DataFrame.merge()
Correct answer: D
Explanation
The correct answer is D, as DataFrame.crossJoin() specifically performs a cross join between two DataFrames. The other options either perform different types of joins or are not designed to execute a cross join.