Skip to content

Commit 021ff4c

Browse files
remove unimplemented method tests
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent b300709 commit 021ff4c

File tree

4 files changed

+0
-81
lines changed

4 files changed

+0
-81
lines changed

src/databricks/sql/backend/thrift_backend.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,8 +1232,6 @@ def fetch_results(
12321232
)
12331233
)
12341234

1235-
from databricks.sql.utils import ThriftResultSetQueueFactory
1236-
12371235
queue = ThriftResultSetQueueFactory.build_queue(
12381236
row_set_type=resp.resultSetMetadata.resultFormat,
12391237
t_row_set=resp.results,

src/databricks/sql/result_set.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,6 @@ def __init__(
480480
str(execute_response.command_id.to_sea_statement_id()),
481481
description=execute_response.description,
482482
max_download_threads=sea_client.max_download_threads,
483-
ssl_options=sea_client.ssl_options,
484483
sea_client=sea_client,
485484
lz4_compressed=execute_response.lz4_compressed,
486485
)

src/databricks/sql/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ def build_queue(
119119
description: Optional[List[Tuple[Any, ...]]] = None,
120120
schema_bytes: Optional[bytes] = None,
121121
max_download_threads: Optional[int] = None,
122-
ssl_options: Optional[SSLOptions] = None,
123122
sea_client: Optional["SeaDatabricksClient"] = None,
124123
lz4_compressed: bool = False,
125124
) -> ResultSetQueue:

tests/unit/test_sea_result_set.py

Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -122,80 +122,3 @@ def test_close_when_connection_closed(
122122
mock_sea_client.close_command.assert_not_called()
123123
assert result_set.has_been_closed_server_side is True
124124
assert result_set.status == CommandState.CLOSED
125-
126-
def test_unimplemented_methods(
127-
self, mock_connection, mock_sea_client, execute_response
128-
):
129-
"""Test that unimplemented methods raise NotImplementedError."""
130-
result_set = SeaResultSet(
131-
connection=mock_connection,
132-
execute_response=execute_response,
133-
sea_client=mock_sea_client,
134-
buffer_size_bytes=1000,
135-
arraysize=100,
136-
)
137-
138-
# Test each unimplemented method individually with specific error messages
139-
with pytest.raises(
140-
NotImplementedError, match="fetchone is not implemented for SEA backend"
141-
):
142-
result_set.fetchone()
143-
144-
with pytest.raises(
145-
NotImplementedError, match="fetchmany is not implemented for SEA backend"
146-
):
147-
result_set.fetchmany(10)
148-
149-
with pytest.raises(
150-
NotImplementedError, match="fetchmany is not implemented for SEA backend"
151-
):
152-
# Test with default parameter value
153-
result_set.fetchmany()
154-
155-
with pytest.raises(
156-
NotImplementedError, match="fetchall is not implemented for SEA backend"
157-
):
158-
result_set.fetchall()
159-
160-
with pytest.raises(
161-
NotImplementedError,
162-
match="fetchmany_arrow is not implemented for SEA backend",
163-
):
164-
result_set.fetchmany_arrow(10)
165-
166-
with pytest.raises(
167-
NotImplementedError,
168-
match="fetchall_arrow is not implemented for SEA backend",
169-
):
170-
result_set.fetchall_arrow()
171-
172-
with pytest.raises(
173-
NotImplementedError, match="fetchone is not implemented for SEA backend"
174-
):
175-
# Test iteration protocol (calls fetchone internally)
176-
next(iter(result_set))
177-
178-
with pytest.raises(
179-
NotImplementedError, match="fetchone is not implemented for SEA backend"
180-
):
181-
# Test using the result set in a for loop
182-
for row in result_set:
183-
pass
184-
185-
def test_fill_results_buffer_not_implemented(
186-
self, mock_connection, mock_sea_client, execute_response
187-
):
188-
"""Test that _fill_results_buffer raises NotImplementedError."""
189-
result_set = SeaResultSet(
190-
connection=mock_connection,
191-
execute_response=execute_response,
192-
sea_client=mock_sea_client,
193-
buffer_size_bytes=1000,
194-
arraysize=100,
195-
)
196-
197-
with pytest.raises(
198-
NotImplementedError,
199-
match="_fill_results_buffer is not implemented for SEA backend",
200-
):
201-
result_set._fill_results_buffer()

0 commit comments

Comments
 (0)