Skip to content

Commit 0adfedd

Browse files
committed
fixed format
Signed-off-by: Sai Shree Pradhan <[email protected]>
1 parent c8a8045 commit 0adfedd

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

src/databricks/sql/client.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,9 @@ def read(self) -> Optional[OAuthToken]:
214214
# use_cloud_fetch
215215
# Enable use of cloud fetch to extract large query results in parallel via cloud storage
216216

217-
logger.debug(f"Connection.__init__(server_hostname={server_hostname}, http_path={http_path})")
217+
logger.debug(
218+
f"Connection.__init__(server_hostname={server_hostname}, http_path={http_path})"
219+
)
218220

219221
if access_token:
220222
access_token_kv = {"access_token": access_token}

src/databricks/sql/thrift_backend.py

+10-5
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ def __init__(
131131
# max_download_threads
132132
# Number of threads for handling cloud fetch downloads. Defaults to 10
133133

134-
logger.debug(f"ThriftBackend.__init__(server_hostname={server_hostname}, port={port}, http_path={http_path})")
134+
logger.debug(
135+
f"ThriftBackend.__init__(server_hostname={server_hostname}, port={port}, http_path={http_path})"
136+
)
135137

136138
port = port or 443
137139
if kwargs.get("_connection_uri"):
@@ -392,7 +394,7 @@ def attempt_request(attempt):
392394

393395
# TODO: don't use exception handling for GOS polling...
394396

395-
logger.debug(f"ThriftBackend.attempt_request: HTTPError: {err}")
397+
logger.error(f"ThriftBackend.attempt_request: HTTPError: {err}")
396398

397399
gos_name = TCLIServiceClient.GetOperationStatus.__name__
398400
if method.__name__ == gos_name:
@@ -408,7 +410,7 @@ def attempt_request(attempt):
408410
else:
409411
raise err
410412
except OSError as err:
411-
logger.debug(f"ThriftBackend.attempt_request: OSError: {err}")
413+
logger.error(f"ThriftBackend.attempt_request: OSError: {err}")
412414
error = err
413415
error_message = str(err)
414416
# fmt: off
@@ -439,7 +441,7 @@ def attempt_request(attempt):
439441
else:
440442
logger.warning(log_string)
441443
except Exception as err:
442-
logger.debug(f"ThriftBackend.attempt_request: Exception: {err}")
444+
logger.error(f"ThriftBackend.attempt_request: Exception: {err}")
443445
error = err
444446
retry_delay = extract_retry_delay(attempt)
445447
error_message = ThriftBackend._extract_error_message_from_headers(
@@ -894,7 +896,10 @@ def execute_command(
894896
):
895897
assert session_handle is not None
896898

897-
logger.debug(f"ThriftBackend.execute_command(operation={operation}, session_handle={session_handle})")
899+
logger.debug(
900+
f"ThriftBackend.execute_command(operation={operation}, session_handle={session_handle})"
901+
)
902+
898903
spark_arrow_types = ttypes.TSparkArrowTypes(
899904
timestampAsArrow=self._use_arrow_native_timestamps,
900905
decimalAsArrow=self._use_arrow_native_decimals,

0 commit comments

Comments
 (0)