As rightly pointed out here: Spark SQL query execution on Hive
Spark SQL when running through HiveContext will make SQL query use the spark engine.
How does spark SQL setting hive.execution.engine=spark
tell hive to do so?
Note this works automatically, we do not have to specify this in hive-site.xml in the conf directory of spark.