The optimizer used by Spark SQL is the Catalyst optimizer. Its main job is to optimize queries that are written in Spark SQL and DataFrame DSL. The Catalyst Optimizer runs queries much faster than its counterpart, RDD.

BY Best Interview Question ON 06 Feb 2020