Cost-Based Optimizer (CBO) in Spark: Statistics, Cardinality Estimation, and Join Selection

Two Spark queries can return exactly the same result.