Updated on 2026-11-06 GMT+08:00

Insufficient Partitions

In scenarios where data skew is caused by non-hotspot keys, if the number of job partitions is too small, each task processes a large amount of data, resulting in long-tail jobs. In this case, you can increase the number of partitions.

  • If Adaptive Query Execution (AQE) is enabled (default scenario): Increase the value of spark.sql.adaptive.coalescePartitions.minPartitionNum and set spark.sql.adaptive.coalescePartitions.initialPartitionNum to the number of available cores.
  • If AQE is disabled: Increase the value of spark.sql.shuffle.partitions.