BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Databricks Certified Associate Developer for Apache Spark 3.5 Exam - Topic 3 Question 22 Discussion

Posted by Fernanda on Oct 16, 2026 at 01:53 PM

A data engineer writes the following code to join two DataFrames df1 and df2:

df1 = spark.read.csv("sales_data.csv") # ~10 GB

df2 = spark.read.csv("product_data.csv") # ~8 MB

result = df1.join(df2, df1.product_id == df2.product_id)

Which join strategy will Spark use?

Suggested Answer: B

The default broadcast join threshold in Spark is:

spark.sql.autoBroadcastJoinThreshold = 10MB

Since df2 is only 8 MB (less than 10 MB), Spark will automatically apply a broadcast join without requiring explicit hints.

From the Spark documentation:

''If one side of the join is smaller than the broadcast threshold, Spark will automatically broadcast it to all executors.''

A is incorrect because Spark does support auto broadcast even with static plans.

B is correct: Spark will automatically broadcast df2.

C and D are incorrect because Spark's default logic handles this optimization.

Final Answer: B


Get Premium Databricks Certified Associate Developer for Apache Spark 3.5 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
9 comments · newest first
DE
Deonna 4 days ago
Agree, shuffle join is the only option here.
EM
Emiko 9 days ago
Wait, are we sure AQE isn't enabled? That changes everything!
JU
Juliana 15 days ago
No way, the size difference is too much for a broadcast join.
DI
Dianne 20 days ago
I think it could be a broadcast join since df2 is small.
TA
Tarra 25 days ago
Definitely a shuffle join, df1 is way bigger!
RE
Reta 1 month ago
I’m leaning towards D because I recall that without broadcast hints, Spark tends to go for shuffle joins by default.
SC
Scot 1 month ago
I feel like I read that if AQE isn't enabled, Spark defaults to a static plan, which could mean A is correct.
LE
Leanna 1 month ago
I remember something about shuffle joins being used when there's a significant size difference, so maybe it's C?
RO
Rodrigo 2 months ago
I think the answer might be B since df2 is much smaller than df1, but I'm not entirely sure about the broadcast threshold.
0/2000 characters

Save Cancel