File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 12
12
from databricks .sql import *
13
13
from databricks .sql .exc import OperationalError
14
14
from databricks .sql .thrift_backend import ThriftBackend
15
- from databricks .sql .utils import ExecuteResponse , ParamEscaper
15
+ from databricks .sql .utils import ExecuteResponse , ParamEscaper , inject_parameters
16
16
from databricks .sql .types import Row
17
17
18
18
logger = logging .getLogger (__name__ )
@@ -260,7 +260,9 @@ def execute(
260
260
:returns self
261
261
"""
262
262
if parameters is not None :
263
- operation = operation % self .escaper .escape_args (parameters )
263
+ operation = inject_parameters (
264
+ operation , self .escaper .escape_args (parameters )
265
+ )
264
266
265
267
self ._check_not_closed ()
266
268
self ._close_and_clear_active_result_set ()
Original file line number Diff line number Diff line change 2
2
from collections .abc import Iterable
3
3
import datetime
4
4
from enum import Enum
5
-
5
+ from typing import Dict
6
6
import pyarrow
7
7
8
8
@@ -172,3 +172,7 @@ def escape_item(self, item):
172
172
return self .escape_datetime (item , self ._DATE_FORMAT )
173
173
else :
174
174
raise exc .ProgrammingError ("Unsupported object {}" .format (item ))
175
+
176
+
177
+ def inject_parameters (operation : str , parameters : Dict [str , str ]):
178
+ return operation % parameters
You can’t perform that action at this time.
0 commit comments