Skip to content

Commit b3ebec5

Browse files
extract status from resp instead of additional expensive call
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 1444a67 commit b3ebec5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/databricks/sql/backend/thrift_backend.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,9 @@ def get_execution_result(
876876
is_staging_operation = t_result_set_metadata_resp.isStagingOperation
877877
is_direct_results = resp.hasMoreRows
878878

879-
status = self.get_query_state(command_id)
879+
status = CommandState.from_thrift_state(resp.status)
880+
if status is None:
881+
raise ValueError(f"Unknown command state: {resp.status}")
880882

881883
execute_response = ExecuteResponse(
882884
command_id=command_id,

0 commit comments

Comments
 (0)