Skip to content

Commit 387102d

Browse files
guid_hex -> hex_guid
Signed-off-by: varun-edachali-dbx <[email protected]>
1 parent 51cef2b commit 387102d

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/databricks/sql/backend/thrift_backend.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ def open_session(self, session_configuration, catalog, schema) -> SessionId:
604604
session_id = SessionId.from_thrift_handle(
605605
response.sessionHandle, properties
606606
)
607-
self._session_id_hex = session_id.guid_hex
607+
self._session_id_hex = session_id.hex_guid
608608
return session_id
609609
except:
610610
self._transport.close()
@@ -1048,8 +1048,8 @@ def get_catalogs(
10481048
session_id: SessionId,
10491049
max_rows: int,
10501050
max_bytes: int,
1051-
cursor: "Cursor",
1052-
) -> "ResultSet":
1051+
cursor: Cursor,
1052+
) -> ResultSet:
10531053
thrift_handle = session_id.to_thrift_handle()
10541054
if not thrift_handle:
10551055
raise ValueError("Not a valid Thrift session ID")

src/databricks/sql/backend/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def __str__(self) -> str:
161161
if isinstance(self.secret, bytes)
162162
else str(self.secret)
163163
)
164-
return f"{self.guid_hex}|{secret_hex}"
164+
return f"{self.hex_guid}|{secret_hex}"
165165
return str(self.guid)
166166

167167
@classmethod
@@ -240,7 +240,7 @@ def to_sea_session_id(self):
240240
return self.guid
241241

242242
@property
243-
def guid_hex(self) -> str:
243+
def hex_guid(self) -> str:
244244
"""
245245
Get a hexadecimal string representation of the session ID.
246246

src/databricks/sql/backend/utils/guid_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ def guid_to_hex_id(guid: bytes) -> str:
1818
try:
1919
this_uuid = uuid.UUID(bytes=guid)
2020
except Exception as e:
21-
logger.debug(f"Unable to convert bytes to UUID: {guid!r} -- {str(e)}")
21+
logger.debug("Unable to convert bytes to UUID: %r -- %s", guid, str(e))
2222
return str(guid)
2323
return str(this_uuid)

src/databricks/sql/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def guid(self):
157157
@property
158158
def guid_hex(self) -> str:
159159
"""Get the session ID in hex format"""
160-
return self._session_id.guid_hex
160+
return self._session_id.hex_guid
161161

162162
def close(self) -> None:
163163
"""Close the underlying session."""

0 commit comments

Comments
 (0)