QuestionQ43

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

Which of the following argument pairs cannot be passed to DataFrame.join() to perform an inner join on two DataFrames, named and aliased as a and b, respectively, when specifying two key columns?

Explanation

Join conditions expressed as Column objects must be Boolean predicates. Bare col("column1") and col("column2") merely reference columns; they do not compare the a and b key values. Two equality predicates, or a list of shared key-column names, correctly define a two-column equi-join. Apache Spark documents that string lists specify same-named equi-join columns, while Column inputs represent join expressions.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!