itholic commented on code in PR #43237:
URL: https://github.com/apache/spark/pull/43237#discussion_r1348233279


##########
python/pyspark/pandas/sql_formatter.py:
##########
@@ -200,7 +201,8 @@ def sql(
     try:
         sdf = session.sql(formatter.format(query, **kwargs), args)
     finally:
-        formatter.clear()
+        if not is_remote():
+            formatter.clear()

Review Comment:
   > it shows a bunch of random tables.
   
   Ah, I see. Then let's wait for another look from @zhengruifeng 👀 
   
   And maybe we could just prevent using pandas-on-Spark object for `ps.sql` 
with Spark Connect for now, and document why we currently doesn't support this.



##########
python/pyspark/pandas/sql_formatter.py:
##########
@@ -200,7 +201,8 @@ def sql(
     try:
         sdf = session.sql(formatter.format(query, **kwargs), args)
     finally:
-        formatter.clear()
+        if not is_remote():
+            formatter.clear()

Review Comment:
   > it shows a bunch of random tables.
   
   Ah, I see. Then let's wait for another look from @zhengruifeng 👀 
   
   And maybe we could just prevent using pandas-on-Spark object for `ps.sql` 
with Spark Connect for now, and document why we currently doesn't support this.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to