Whenever you're ready, walk me through how you'd approach this.
How do you optimize a Spark job for performance and cost?
Discuss a practical approach covering diagnosis, partitioning, join strategy, shuffle reduction, file layout, caching, serialization, cluster sizing, adaptive query execution, and workload-specific trade-offs. Explain how you would validate improvements using Spark UI, execution metrics, data-quality checks, and cost monitoring.