Skip to content

Commit 54077f7

Browse files
chore: docstring + line width
Signed-off-by: varun-edachali-dbx <[email protected]>
1 parent 765bbd7 commit 54077f7

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/databricks/sql/backend/databricks_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def execute_command(
9191
Args:
9292
operation: The SQL command or query to execute
9393
session_id: The session identifier in which to execute the command
94-
max_rows: Maximum number of rows to fetch in a single batch
95-
max_bytes: Maximum number of bytes to fetch in a single batch
94+
max_rows: Maximum number of rows to fetch in a single fetch batch
95+
max_bytes: Maximum number of bytes to fetch in a single fetch batch
9696
lz4_compression: Whether to use LZ4 compression for result data
9797
cursor: The cursor object that will handle the results
9898
use_cloud_fetch: Whether to use cloud fetch for retrieving large result sets

src/databricks/sql/backend/types.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99

1010
class BackendType(Enum):
11-
"""Enum representing the type of backend."""
11+
"""
12+
Enum representing the type of backend
13+
"""
1214

1315
THRIFT = "thrift"
1416
SEA = "sea"
@@ -36,7 +38,7 @@ def __init__(
3638
backend_type: The type of backend (THRIFT or SEA)
3739
guid: The primary identifier for the session
3840
secret: The secret part of the identifier (only used for Thrift)
39-
info: Additional information about the session
41+
properties: Additional information about the session
4042
"""
4143
self.backend_type = backend_type
4244
self.guid = guid
@@ -56,7 +58,12 @@ def __str__(self) -> str:
5658
if self.backend_type == BackendType.SEA:
5759
return str(self.guid)
5860
elif self.backend_type == BackendType.THRIFT:
59-
return f"{self.get_hex_id()}|{guid_to_hex_id(self.secret) if isinstance(self.secret, bytes) else str(self.secret)}"
61+
secret_hex = (
62+
guid_to_hex_id(self.secret)
63+
if isinstance(self.secret, bytes)
64+
else str(self.secret)
65+
)
66+
return f"{self.get_hex_id()}|{secret_hex}"
6067
return str(self.guid)
6168

6269
@classmethod

0 commit comments

Comments
 (0)