1. Databricks Documentation
Adaptive query execution: In the section "Optimize joins
" the documentation states: "AQE can convert a sort-merge join to a shuffled hash join when one side of the join is small enough. This is controlled by the configuration spark.sql.adaptive.maxShuffledHashJoinLocalMapThreshold."
Source: Databricks Documentation > Optimizations > Adaptive query execution > Optimize joins.
2. Apache Spark 3.x Official Documentation
SQL Guide
Performance Tuning: In the section on Adaptive Query Execution
under "Dynamically switching join strategies
" it explains: "AQE can convert a sort-merge join to a shuffled hash join when the runtime statistics of any join side is smaller than the configured threshold spark.sql.adaptive.maxShuffledHashJoinLocalMapThreshold."
Source: Apache Spark Documentation > SQL Guide > Performance Tuning > Adaptive Query Execution > Dynamically switching join strategies.