Skip to content

Commit 51b709b

Browse files
zhengruifengHyukjinKwon
authored andcommitted
[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 <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent 91fda18 commit 51b709b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

python/pyspark/sql/connect/session.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,10 @@ def sparkContext(self) -> Any:
400400
def streams(self) -> Any:
401401
raise NotImplementedError("streams() is not implemented.")
402402

403+
@property
404+
def readStream(self) -> Any:
405+
raise NotImplementedError("readStream() is not implemented.")
406+
403407
@property
404408
def udf(self) -> Any:
405409
raise NotImplementedError("udf() is not implemented.")

python/pyspark/sql/tests/connect/test_connect_basic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2136,11 +2136,15 @@ def test_unsupported_session_functions(self):
21362136
with self.assertRaises(NotImplementedError):
21372137
RemoteSparkSession.getActiveSession()
21382138

2139+
with self.assertRaises(NotImplementedError):
2140+
RemoteSparkSession.builder.enableHiveSupport()
2141+
21392142
for f in (
21402143
"newSession",
21412144
"conf",
21422145
"sparkContext",
21432146
"streams",
2147+
"readStream",
21442148
"udf",
21452149
"version",
21462150
):

0 commit comments

Comments
 (0)