title: spark createOrReplaceTempView vs createGlobalTempView
body: <p>Spark Dataset 2.0 provides two functions <code>createOrReplaceTempView</code> and  <code>createGlobalTempView</code>. I am not able to understand the basic difference between both functions.</p>
  
  <p>According to <a href="https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala" rel="noreferrer">API documents</a>: </p>
  
  <p><strong>createOrReplaceTempView</strong>: The lifetime of this
  temporary view is tied to the [[SparkSession]] that was used to create this Dataset. <br>
  So, when I call <code>sparkSession.close()</code> the defined will be destroyed. is it true?</p>
  
  <p><strong>createGlobalTempView</strong>: The lifetime of this temporary view is tied to this Spark application.</p>
  
  <p>when this type of view will be destroyed? any example. like sparkSession.close()?</p>