Skip to content

Commit 802d8dc

Browse files
command_handle -> command_id in ExecuteResponse
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 307f447 commit 802d8dc

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/databricks/sql/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ def __init__(
12301230
:param use_cloud_fetch: Whether to use cloud fetch for retrieving results
12311231
"""
12321232
self.connection = connection
1233-
self.command_id = execute_response.command_handle
1233+
self.command_id = execute_response.command_id
12341234
self.op_state = execute_response.status
12351235
self.has_been_closed_server_side = execute_response.has_been_closed_server_side
12361236
self.has_more_rows = execute_response.has_more_rows

tests/unit/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def new(cls):
4242
description=None,
4343
arrow_queue=None,
4444
is_staging_operation=False,
45-
command_handle=b"\x22",
45+
command_id=None,
4646
has_been_closed_server_side=True,
4747
has_more_rows=True,
4848
lz4_compressed=True,
@@ -155,7 +155,7 @@ def test_closing_result_set_hard_closes_commands(self):
155155
result_set.close()
156156

157157
mock_thrift_backend.close_command.assert_called_once_with(
158-
mock_results_response.command_handle
158+
mock_results_response.command_id
159159
)
160160

161161
@patch("%s.client.ResultSet" % PACKAGE_NAME)

tests/unit/test_fetches.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def make_dummy_result_set_from_initial_results(initial_results):
4747
has_more_rows=False,
4848
description=Mock(),
4949
lz4_compressed=Mock(),
50-
command_handle=None,
50+
command_id=None,
5151
arrow_queue=arrow_queue,
5252
arrow_schema_bytes=schema.serialize().to_pybytes(),
5353
is_staging_operation=False,
@@ -96,7 +96,7 @@ def fetch_results(
9696
for col_id in range(num_cols)
9797
],
9898
lz4_compressed=Mock(),
99-
command_handle=None,
99+
command_id=None,
100100
arrow_queue=None,
101101
arrow_schema_bytes=None,
102102
is_staging_operation=False,

tests/unit/test_fetches_bench.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def make_dummy_result_set_from_initial_results(arrow_table):
3737
has_been_closed_server_side=True,
3838
has_more_rows=False,
3939
description=Mock(),
40-
command_handle=None,
40+
command_id=None,
4141
arrow_queue=arrow_queue,
4242
arrow_schema=arrow_table.schema,
4343
),

0 commit comments

Comments
 (0)