You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2024/12/12 08:33:23 UTC

(iotdb) branch py_BetterErrorMsg_13 created (now 136ff91c676)

This is an automated email from the ASF dual-hosted git repository.

haonan pushed a change to branch py_BetterErrorMsg_13
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 136ff91c676 [Py-client][dev/1.3] Print Dataset is closed error msg if user continues to fetch from it

This branch includes the following new commits:

     new 136ff91c676 [Py-client][dev/1.3] Print Dataset is closed error msg if user continues to fetch from it

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(iotdb) 01/01: [Py-client][dev/1.3] Print Dataset is closed error msg if user continues to fetch from it

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch py_BetterErrorMsg_13
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 136ff91c676ec356793bb61a1625711ba53b9896
Author: HTHou <hh...@outlook.com>
AuthorDate: Thu Dec 12 16:30:40 2024 +0800

    [Py-client][dev/1.3] Print Dataset is closed error msg if user continues to fetch from it
---
 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,