Reviewed by Aditya Kumar · Last reviewed 2026-03-24
**Adaptive Query Execution** (Spark 3.x): Optimizes at runtime using actual statistics. **Join optimizations**: (1) Coalesce partitions after shuffleâmerge small partitions. (2) Convert sort-merge to broadcast when runtime shows one side small. (3) Skew joinâsplit large...
Adaptive Query Execution (Spark 3.x): Optimizes at runtime using actual statistics. Join optimizations: (1) Coalesce partitions after shuffleâmerge small partitions. (2) Convert sort-merge to broadcast when runtime shows one side small. (3) Skew joinâsplit large partition, replicate small side. Enable: spark.sql.adaptive.enabled=true. Why: Planner uses estimates; AQE corrects with real data. Trade-off: Slight overhead; big win for skewed data.
Red Flag: Disabling AQE without reason. Pro-Move: 'AQE fixed our skewed joinâconverted to broadcast at runtime; no manual salting neededâjob time dropped 60%.'
According to DataEngPrep.tech, this is one of the most frequently asked SQL interview questions, reported at 1 company. DataEngPrep.tech maintains an editor-reviewed database of 1,863 data engineering interview questions across 7 categories.