This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 51b709b33be [SPARK-41934][CONNECT][PYTHON][FOLLOWUP] Add 
`Session.readStream` to the unsupported list
51b709b33be is described below

commit 51b709b33bef2bec6ca7baf99a57dc311dd8c5ac
Author: Ruifeng Zheng <ruife...@apache.org>
AuthorDate: Tue Jan 10 18:02:59 2023 +0900

    [SPARK-41934][CONNECT][PYTHON][FOLLOWUP] Add `Session.readStream` to the 
unsupported list
    
    ### What changes were proposed in this pull request?
    Add `Session.readStream` to the unsupported list
    
    ### Why are the changes needed?
    all missing API should throw `NotImplementedError`
    
    ### Does this PR introduce _any_ user-facing change?
    yes, `NotImplementedError`
    
    ### How was this patch tested?
    updated UT
    
    Closes #39478 from zhengruifeng/connect_session_missing_update.
    
    Authored-by: Ruifeng Zheng <ruife...@apache.org>
    Signed-off-by: Hyukjin Kwon <gurwls...@apache.org>
---
 python/pyspark/sql/connect/session.py                  | 4 ++++
 python/pyspark/sql/tests/connect/test_connect_basic.py | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/python/pyspark/sql/connect/session.py 
b/python/pyspark/sql/connect/session.py
index 82bde57beb3..4c5ea3da10e 100644
--- a/python/pyspark/sql/connect/session.py
+++ b/python/pyspark/sql/connect/session.py
@@ -400,6 +400,10 @@ class SparkSession:
     def streams(self) -> Any:
         raise NotImplementedError("streams() is not implemented.")
 
+    @property
+    def readStream(self) -> Any:
+        raise NotImplementedError("readStream() is not implemented.")
+
     @property
     def udf(self) -> Any:
         raise NotImplementedError("udf() is not implemented.")
diff --git a/python/pyspark/sql/tests/connect/test_connect_basic.py 
b/python/pyspark/sql/tests/connect/test_connect_basic.py
index c946c735a1d..d8bde3db6d7 100644
--- a/python/pyspark/sql/tests/connect/test_connect_basic.py
+++ b/python/pyspark/sql/tests/connect/test_connect_basic.py
@@ -2136,11 +2136,15 @@ class SparkConnectBasicTests(SparkConnectSQLTestCase):
         with self.assertRaises(NotImplementedError):
             RemoteSparkSession.getActiveSession()
 
+        with self.assertRaises(NotImplementedError):
+            RemoteSparkSession.builder.enableHiveSupport()
+
         for f in (
             "newSession",
             "conf",
             "sparkContext",
             "streams",
+            "readStream",
             "udf",
             "version",
         ):


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to