Skip to content

Commit 4805384

Browse files
authored
Merge pull request #381 from FlorentinD/update-aurads-supporting-arrow
Remove outdated try catch for AuraDS
2 parents 4c3d6f6 + aac634f commit 4805384

File tree

1 file changed

+14
-26
lines changed

1 file changed

+14
-26
lines changed

graphdatascience/graph_data_science.py

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -103,32 +103,20 @@ def __init__(
103103
self._query_runner.set_server_version(self._server_version)
104104

105105
if arrow and self._server_version >= ServerVersion(2, 1, 0):
106-
try:
107-
arrow_info: "Series[Any]" = self._query_runner.run_query(
108-
"CALL gds.debug.arrow()", custom_error=False
109-
).squeeze()
110-
listen_address: str = arrow_info.get(
111-
"advertisedListenAddress", arrow_info["listenAddress"]
112-
) # type: ignore
113-
if arrow_info["running"]:
114-
self._query_runner = ArrowQueryRunner(
115-
listen_address,
116-
self._query_runner,
117-
self._server_version,
118-
auth,
119-
driver.encrypted,
120-
arrow_disable_server_verification,
121-
arrow_tls_root_certs,
122-
)
123-
except Exception as e:
124-
# AuraDS does not have arrow support at this time, so we should not warn about it.
125-
# TODO: Remove this check when AuraDS gets arrow support.
126-
if (
127-
"There is no procedure with the name `gds.debug.arrow` "
128-
"registered for this database instance." not in str(e)
129-
):
130-
warnings.warn(f"Could not initialize GDS Flight Server client: {e}")
131-
106+
arrow_info: "Series[Any]" = self._query_runner.run_query(
107+
"CALL gds.debug.arrow()", custom_error=False
108+
).squeeze()
109+
listen_address: str = arrow_info.get("advertisedListenAddress", arrow_info["listenAddress"]) # type: ignore
110+
if arrow_info["running"]:
111+
self._query_runner = ArrowQueryRunner(
112+
listen_address,
113+
self._query_runner,
114+
self._server_version,
115+
auth,
116+
driver.encrypted,
117+
arrow_disable_server_verification,
118+
arrow_tls_root_certs,
119+
)
132120
if aura_db_connection_info:
133121
if self._server_version >= ServerVersion(2, 4, 0):
134122
self._query_runner = AuraDbArrowQueryRunner(self._query_runner, aura_db_connection_info)

0 commit comments

Comments
 (0)