Skip to content

Commit ae0f9c3

Browse files
committed
Yield versions only if available
We still want to support GDS 2.6.0 in our client
1 parent 05731c8 commit ae0f9c3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

graphdatascience/query_runner/gds_arrow_client.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ def create(
3232
tls_root_certs: Optional[bytes] = None,
3333
connection_string_override: Optional[str] = None,
3434
) -> "GdsArrowClient":
35+
if query_runner.server_version() > ServerVersion(2, 6, 0):
36+
debugYields = ["listenAddress", "versions"]
37+
else:
38+
# return enabled to avoid squeeze returning a single str
39+
debugYields = ["listenAddress", "enabled"]
40+
3541
arrow_info = (
36-
query_runner.call_procedure(
37-
endpoint="gds.debug.arrow", custom_error=False, yields=["listenAddress", "versions"]
38-
)
42+
query_runner.call_procedure(endpoint="gds.debug.arrow", custom_error=False, yields=debugYields)
3943
.squeeze()
4044
.to_dict()
4145
)

0 commit comments

Comments
 (0)