title: spark.sql vs SqlContext
body: <p>I have used SQL in Spark, in this example:</p>
  
  <pre><code>results = spark.sql("select * from ventas")
  </code></pre>
  
  <p>where ventas is a dataframe, previosuly cataloged like a table:</p>
  
  <pre><code>df.createOrReplaceTempView('ventas')
  </code></pre>
  
  <p>but I have seen other ways of working with SQL in Spark, using the class SqlContext:</p>
  
  <pre><code>df = sqlContext.sql("SELECT * FROM table")
  </code></pre>
  
  <p>What is the difference between both of them?</p>
  
  <p>Thanks in advance</p>