Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/databricks/sql/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ def execute(
self,
operation: str,
parameters: Optional[TParameterCollection] = None,
enforce_embedded_schema_correctness=False,
) -> "Cursor":
"""
Execute a query and wait for execution to complete.
Expand Down Expand Up @@ -801,6 +802,7 @@ def execute(
use_cloud_fetch=self.connection.use_cloud_fetch,
parameters=prepared_params,
async_op=False,
enforce_embedded_schema_correctness=enforce_embedded_schema_correctness,
)
self.active_result_set = ResultSet(
self.connection,
Expand All @@ -822,6 +824,7 @@ def execute_async(
self,
operation: str,
parameters: Optional[TParameterCollection] = None,
enforce_embedded_schema_correctness=False,
) -> "Cursor":
"""

Expand Down Expand Up @@ -862,6 +865,7 @@ def execute_async(
use_cloud_fetch=self.connection.use_cloud_fetch,
parameters=prepared_params,
async_op=True,
enforce_embedded_schema_correctness=enforce_embedded_schema_correctness,
)

return self
Expand Down
2 changes: 2 additions & 0 deletions src/databricks/sql/thrift_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,7 @@ def execute_command(
use_cloud_fetch=True,
parameters=[],
async_op=False,
enforce_embedded_schema_correctness=False,
):
assert session_handle is not None

Expand Down Expand Up @@ -910,6 +911,7 @@ def execute_command(
},
useArrowNativeTypes=spark_arrow_types,
parameters=parameters,
enforceEmbeddedSchemaCorrectness=enforce_embedded_schema_correctness,
)
resp = self.make_request(self._client.ExecuteStatement, req)

Expand Down
Loading