Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Databricks Certified Associate Developer for Apache Spark · Databricks
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
- F.coalesce(col1, col2, ...) returns the first non-null value among its arguments — commonly used like coalesce(col('a'), lit(0)) to replace nulls with 0. Since Spark 3.5.0 (SPARK-43937), F.ifnull(col, default) was added and does the exact same two-argument null-replacement directly (equivalent to coalesce(col, default)). F.lit produces a literal value (not a null-replacement by itself). F.when is for general conditional CASE WHEN logic, not the idiomatic tool for this.