From 5ec63f9300fe424ac9972c31e388cf2d4150ccdd Mon Sep 17 00:00:00 2001 From: Sihyeon Jang Date: Wed, 6 Dec 2023 20:12:29 +0900 Subject: [PATCH] Add is_open to check transport of connection Signed-off-by: Sihyeon Jang --- pyhive/hive.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyhive/hive.py b/pyhive/hive.py index c1287488..cf702704 100644 --- a/pyhive/hive.py +++ b/pyhive/hive.py @@ -354,6 +354,9 @@ def client(self): def sessionHandle(self): return self._sessionHandle + def is_open(self): + return self._transport.isOpen() + def rollback(self): raise NotSupportedError("Hive does not have transactions") # pragma: no cover