You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by dongjoon-hyun <gi...@git.apache.org> on 2017/05/30 21:40:49 UTC

[GitHub] spark pull request #18147: [SPARK-19236][SQL][FOLLOW-UP] Added createOrRepla...

Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18147#discussion_r119222688
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -191,6 +191,23 @@ def createGlobalTempView(self, name):
             """
             self._jdf.createGlobalTempView(name)
     
    +    @since(2.2)
    +    def createOrReplaceGlobalTempView(self, name):
    +        """Creates or replaces a global temporary view using the given name.
    +
    +        The lifetime of this temporary view is tied to this Spark application.
    +
    +        >>> df.createOrReplaceGlobalTempView("people")
    +        >>> df2 = df.filter(df.age > 3)
    +        >>> df2.createOrReplaceGlobalTempView("people")
    +        >>> df3 = spark.sql("select * from people")
    --- End diff --
    
    `df3 = spark.sql("select * from _global_temp.people")`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org