This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/dev/1.3 by this push:
new d05b9339ccf [Py-client][dev/1.3] Print Dataset is closed error msg if
user continues to fetch from it (#14397)
d05b9339ccf is described below
commit d05b9339ccff814f9abb18e197850f3f12995117
Author: Haonan <[email protected]>
AuthorDate: Fri Dec 13 10:47:27 2024 +0800
[Py-client][dev/1.3] Print Dataset is closed error msg if user continues to
fetch from it (#14397)
---
iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py
b/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py
index e9621bf81b9..2249e1c7c0d 100644
--- a/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py
+++ b/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py
@@ -25,6 +25,7 @@ import pandas as pd
from thrift.transport import TTransport
from iotdb.thrift.rpc.IClientRPCService import TSFetchResultsReq,
TSCloseOperationReq
from iotdb.tsfile.utils.DateUtils import parse_int_to_date
+from iotdb.utils.IoTDBConnectionException import IoTDBConnectionException
from iotdb.utils.IoTDBConstants import TSDataType
logger = logging.getLogger("IoTDB")
@@ -417,6 +418,8 @@ class IoTDBRpcDataSet(object):
return df
def fetch_results(self):
+ if self.__is_closed:
+ raise IoTDBConnectionException("This DataSet is already closed")
self.__rows_index = 0
request = TSFetchResultsReq(
self.__session_id,