HyukjinKwon commented on code in PR #38642: URL: https://github.com/apache/spark/pull/38642#discussion_r1022306947
########## python/pyspark/sql/connect/dataframe.py: ########## @@ -633,6 +633,48 @@ def explain(self) -> str: else: return "" + def createGlobalTempView(self, name: str) -> None: + """Creates a global temporary view with this :class:`DataFrame`. + + The lifetime of this temporary view is tied to this Spark application. + + .. versionadded:: 3.4.0 + + Parameters + ---------- + name : str + Name of the view. + + Returns + ------- + None + """ + command = plan.CreateView( + child=self._plan, name=name, is_global=True, replace=False + ).command(session=self._session) + self._session.execute_command(command) + + def createOrReplaceGlobalTempView(self, name: str) -> None: + """Creates or replaces a global temporary view using the given name. + + The lifetime of this temporary view is tied to this Spark application. + + .. versionadded:: 3.4.0 + + Parameters + ---------- + name : str + Name of the view. + + Returns + ------- + None Review Comment: ```suggestion ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org