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

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


The following commit(s) were added to refs/heads/master by this push:
     new bc4dd72eafb Print Dataset is closed error msg if user continues to 
fetch from it
bc4dd72eafb is described below

commit bc4dd72eafb8760533a1d7f5bba117d095ae4c13
Author: Jackie Tien <[email protected]>
AuthorDate: Wed Nov 6 17:22:09 2024 +0800

    Print Dataset is closed error msg if user continues to fetch from it
---
 .../src/main/java/org/apache/iotdb/rpc/IoTDBRpcDataSet.java            | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/IoTDBRpcDataSet.java
 
b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/IoTDBRpcDataSet.java
index 95a2239dec8..c4201c304ce 100644
--- 
a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/IoTDBRpcDataSet.java
+++ 
b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/IoTDBRpcDataSet.java
@@ -254,6 +254,9 @@ public class IoTDBRpcDataSet {
   }
 
   public boolean fetchResults() throws StatementExecutionException, 
IoTDBConnectionException {
+    if (isClosed) {
+      throw new IoTDBConnectionException("This DataSet is already closed");
+    }
     TSFetchResultsReq req = new TSFetchResultsReq(sessionId, sql, fetchSize, 
queryId, true);
     req.setTimeout(timeout);
     try {

Reply via email to