title: Spark 2: how does it work when SparkSession enableHiveSupport() is invoked
body: <p>My question is rather simple, but somehow I cannot find a clear answer by reading the documentation.</p>
  
  <p>I have <strong>Spark2</strong> running on a <strong>CDH 5.10</strong> cluster.
  There is also Hive and a metastore.</p>
  
  <p>I create a session in my Spark program as follows:</p>
  
  <pre><code>SparkSession spark = SparkSession.builder().appName("MyApp").enableHiveSupport().getOrCreate()
  </code></pre>
  
  <p>Suppose I have the following HiveQL query:</p>
  
  <pre><code>spark.sql("SELECT someColumn FROM someTable")
  </code></pre>
  
  <p>I would like to know whether: </p>
  
  <ol>
  <li>under the hood this query is translated into Hive MapReduce primitives, or </li>
  <li>the support for HiveQL is only at a syntactical level and Spark SQL will be used under the hood.</li>
  </ol>
  
  <p>I am doing some performance evaluation and I don't know whether I should claim the time performance of queries executed with <code>spark.sql([hiveQL query])</code> refer to Spark or Hive.</p>