Skip to content

Commit c0e98f4

Browse files
remove partial parameter fix changes
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent a018273 commit c0e98f4

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
WaitTimeout,
1515
MetadataCommands,
1616
)
17-
from databricks.sql.thrift_api.TCLIService import ttypes
1817

1918
if TYPE_CHECKING:
2019
from databricks.sql.client import Cursor
@@ -406,7 +405,7 @@ def execute_command(
406405
lz4_compression: bool,
407406
cursor: Cursor,
408407
use_cloud_fetch: bool,
409-
parameters: List[ttypes.TSparkParameter],
408+
parameters: List[Dict[str, Any]],
410409
async_op: bool,
411410
enforce_embedded_schema_correctness: bool,
412411
) -> Union[SeaResultSet, None]:
@@ -440,9 +439,9 @@ def execute_command(
440439
for param in parameters:
441440
sea_parameters.append(
442441
StatementParameter(
443-
name=param.name,
444-
value=param.value.stringValue,
445-
type=param.type,
442+
name=param["name"],
443+
value=param["value"],
444+
type=param["type"] if "type" in param else None,
446445
)
447446
)
448447

tests/unit/test_sea_backend.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,7 @@ def test_command_execution_advanced(
355355
"status": {"state": "SUCCEEDED"},
356356
}
357357
mock_http_client._make_request.return_value = execute_response
358-
param = Mock()
359-
param.name = "param1"
360-
param.value = Mock()
361-
param.value.stringValue = "value1"
362-
param.type = "STRING"
358+
param = {"name": "param1", "value": "value1", "type": "STRING"}
363359

364360
with patch.object(sea_client, "get_execution_result"):
365361
sea_client.execute_command(

0 commit comments

Comments
 (0)