Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite48a6fb

Browse files
remove redundant missing statement_id check
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent3195765 commite48a6fb

File tree

2 files changed

+0
-48
lines changed

2 files changed

+0
-48
lines changed

‎src/databricks/sql/backend/sea/backend.py‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -528,14 +528,6 @@ def execute_command(
528528
)
529529
response=ExecuteStatementResponse.from_dict(response_data)
530530
statement_id=response.statement_id
531-
ifnotstatement_id:
532-
raiseServerOperationError(
533-
"Failed to execute command: No statement ID returned",
534-
{
535-
"operation-id":None,
536-
"diagnostic-info":None,
537-
},
538-
)
539531

540532
command_id=CommandId.from_sea_statement_id(statement_id)
541533

‎tests/unit/test_sea_backend.py‎

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -292,26 +292,6 @@ def test_command_execution_async(
292292
assertisinstance(mock_cursor.active_command_id,CommandId)
293293
assertmock_cursor.active_command_id.guid=="test-statement-456"
294294

295-
# Test async with missing statement ID
296-
mock_http_client.reset_mock()
297-
mock_http_client._make_request.return_value= {"status": {"state":"PENDING"}}
298-
withpytest.raises(ServerOperationError)asexcinfo:
299-
sea_client.execute_command(
300-
operation="SELECT 1",
301-
session_id=sea_session_id,
302-
max_rows=100,
303-
max_bytes=1000,
304-
lz4_compression=False,
305-
cursor=mock_cursor,
306-
use_cloud_fetch=False,
307-
parameters=[],
308-
async_op=True,
309-
enforce_embedded_schema_correctness=False,
310-
)
311-
assert"Failed to execute command: No statement ID returned"instr(
312-
excinfo.value
313-
)
314-
315295
deftest_command_execution_advanced(
316296
self,sea_client,mock_http_client,mock_cursor,sea_session_id
317297
):
@@ -411,26 +391,6 @@ def test_command_execution_advanced(
411391
)
412392
assert"Command failed"instr(excinfo.value)
413393

414-
# Test missing statement ID
415-
mock_http_client.reset_mock()
416-
mock_http_client._make_request.return_value= {"status": {"state":"SUCCEEDED"}}
417-
withpytest.raises(ServerOperationError)asexcinfo:
418-
sea_client.execute_command(
419-
operation="SELECT 1",
420-
session_id=sea_session_id,
421-
max_rows=100,
422-
max_bytes=1000,
423-
lz4_compression=False,
424-
cursor=mock_cursor,
425-
use_cloud_fetch=False,
426-
parameters=[],
427-
async_op=False,
428-
enforce_embedded_schema_correctness=False,
429-
)
430-
assert"Failed to execute command: No statement ID returned"instr(
431-
excinfo.value
432-
)
433-
434394
deftest_command_management(
435395
self,
436396
sea_client,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp