This is an automated email from the ASF dual-hosted git repository. ericpai pushed a commit to branch improve/iotdb-3585 in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 041abdca9b794e8fc5aaea6b6630bb8ba1cb719d Author: ericpai <ericpa...@hotmail.com> AuthorDate: Tue Jun 21 16:21:25 2022 +0800 [IOTDB-3585] Support set/getFetchSize() in IT framework --- .../apache/iotdb/itbase/runtime/ClusterTestStatement.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/integration-test/src/main/java/org/apache/iotdb/itbase/runtime/ClusterTestStatement.java b/integration-test/src/main/java/org/apache/iotdb/itbase/runtime/ClusterTestStatement.java index add3a3e0ed..3a5d20b77b 100644 --- a/integration-test/src/main/java/org/apache/iotdb/itbase/runtime/ClusterTestStatement.java +++ b/integration-test/src/main/java/org/apache/iotdb/itbase/runtime/ClusterTestStatement.java @@ -18,6 +18,8 @@ */ package org.apache.iotdb.itbase.runtime; +import org.apache.iotdb.jdbc.Config; + import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; @@ -37,6 +39,7 @@ public class ClusterTestStatement implements Statement { private boolean closed = false; private int maxRows = Integer.MAX_VALUE; private int queryTimeout = DEFAULT_QUERY_TIMEOUT; + private int fetchSize = Config.DEFAULT_FETCH_SIZE; public ClusterTestStatement(NodeConnection writeConnection, List<NodeConnection> readConnections) throws SQLException { @@ -198,13 +201,17 @@ public class ClusterTestStatement implements Statement { } @Override - public void setFetchSize(int rows) { - throw new UnsupportedOperationException(); + public void setFetchSize(int rows) throws SQLException { + this.fetchSize = rows; + writeStatement.setFetchSize(fetchSize); + for (Statement readStatement : readStatements) { + readStatement.setFetchSize(fetchSize); + } } @Override public int getFetchSize() { - throw new UnsupportedOperationException(); + return fetchSize; } @Override