A data engineer tunes a PySpark job that reads two Delta tables, joins them and aggregates the result, on a cluster with 64 cores in total. Wanting to control how many partitions the job's shuffles produce, the engineer finds both spark.sql.shuffle.partitions and spark.default.parallelism in the cluster's Spark configuration and asks which one governs this workload. Which two statements are correct for this job? (Select TWO.)
- Aspark.default.parallelism takes precedence over spark.sql.shuffle.partitions whenever both are set, so the DataFrame join produces one partition per core on the cluster.
- Bspark.sql.shuffle.partitions is fixed when the cluster starts, so changing the number of partitions for this job requires editing the cluster configuration and restarting the compute.
- Cspark.sql.shuffle.partitions sets the number of partitions produced by shuffles in DataFrame and SQL operations, including this job's join and aggregation, and it defaults to 200. Correct
- Dspark.default.parallelism sets the number of partitions produced by shuffles in DataFrame and SQL operations, so raising it is the supported way to split this job's join more finely.
- Espark.default.parallelism governs the default partition count for RDD operations such as reduceByKey and parallelize, so it does not control the shuffles this DataFrame job performs. Correct
Why A is wrong: Tempting because the name reads like a global default, but there is no such precedence: the SQL and DataFrame planner reads its own shuffle partition setting and ignores this one.
Why B is wrong: Plausible because several cluster level settings do behave this way, but this is a session configuration that can be set at runtime from the notebook and takes effect on subsequent queries.
Why C is correct: This is precisely the setting the DataFrame and SQL engine consults when deciding how many post shuffle partitions a join or aggregation writes, and 200 is its documented default.
Why D is wrong: This mirrors the correct statement with the wrong setting named, which is exactly the confusion the two similar names create; the DataFrame planner does not read this value.
Why E is correct: The setting supplies the default partitioning for RDD level transformations and for parallelize, which leaves a DataFrame job like this one entirely unaffected by it.