Skip to content

Commit

Permalink
[SPARK-41934][CONNECT][PYTHON][FOLLOWUP] Add Session.readStream to …
Browse files Browse the repository at this point in the history
…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 apache#39478 from zhengruifeng/connect_session_missing_update.

Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
  • Loading branch information
zhengruifeng authored and HyukjinKwon committed Jan 10, 2023
1 parent 91fda18 commit 51b709b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/pyspark/sql/connect/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,10 @@ def sparkContext(self) -> Any:
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.")
Expand Down
4 changes: 4 additions & 0 deletions python/pyspark/sql/tests/connect/test_connect_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2136,11 +2136,15 @@ def test_unsupported_session_functions(self):
with self.assertRaises(NotImplementedError):
RemoteSparkSession.getActiveSession()

with self.assertRaises(NotImplementedError):
RemoteSparkSession.builder.enableHiveSupport()

for f in (
"newSession",
"conf",
"sparkContext",
"streams",
"readStream",
"udf",
"version",
):
Expand Down

0 comments on commit 51b709b

Please sign in to comment.