You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2020/07/16 08:27:59 UTC

[incubator-iotdb] branch bug/fetchSize created (now 40befcc)

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

jackietien pushed a change to branch bug/fetchSize
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.


      at 40befcc  change the default fetch size in session

This branch includes the following new commits:

     new 40befcc  change the default fetch size in session

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.



[incubator-iotdb] 01/01: change the default fetch size in session

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

jackietien pushed a commit to branch bug/fetchSize
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit 40befcce8eee588165ea508137348dfe82075df3
Author: JackieTien97 <Ja...@foxmail.com>
AuthorDate: Thu Jul 16 16:27:36 2020 +0800

    change the default fetch size in session
---
 example/session/src/main/java/org/apache/iotdb/SessionExample.java | 4 ++--
 session/src/main/java/org/apache/iotdb/session/SessionDataSet.java | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/example/session/src/main/java/org/apache/iotdb/SessionExample.java b/example/session/src/main/java/org/apache/iotdb/SessionExample.java
index 01b05e5..3d813ec 100644
--- a/example/session/src/main/java/org/apache/iotdb/SessionExample.java
+++ b/example/session/src/main/java/org/apache/iotdb/SessionExample.java
@@ -342,7 +342,7 @@ public class SessionExample {
     SessionDataSet dataSet;
     dataSet = session.executeQueryStatement("select * from root.sg1.d1");
     System.out.println(dataSet.getColumnNames());
-    dataSet.setFetchSize(1024); // default is 512
+    dataSet.setFetchSize(10000); // default is 1024
     while (dataSet.hasNext()) {
       System.out.println(dataSet.next());
     }
@@ -356,7 +356,7 @@ public class SessionExample {
     dataSet = session.executeQueryStatement("select * from root.sg1.d1");
     DataIterator iterator = dataSet.iterator();
     System.out.println(dataSet.getColumnNames());
-    dataSet.setFetchSize(1024); // default is 512
+    dataSet.setFetchSize(10000); // default is 1024
     while (iterator.next()) {
       StringBuilder builder = new StringBuilder();
       // get time
diff --git a/session/src/main/java/org/apache/iotdb/session/SessionDataSet.java b/session/src/main/java/org/apache/iotdb/session/SessionDataSet.java
index b1708f8..f264ece 100644
--- a/session/src/main/java/org/apache/iotdb/session/SessionDataSet.java
+++ b/session/src/main/java/org/apache/iotdb/session/SessionDataSet.java
@@ -45,8 +45,8 @@ public class SessionDataSet {
       Map<String, Integer> columnNameIndex,
       long queryId, TSIService.Iface client, long sessionId, TSQueryDataSet queryDataSet,
       boolean ignoreTimeStamp) {
-    this.ioTDBRpcDataSet = new IoTDBRpcDataSet(sql, columnNameList, columnTypeList,
-        columnNameIndex, ignoreTimeStamp, queryId, client, sessionId, queryDataSet, 1024);
+    this.ioTDBRpcDataSet = new IoTDBRpcDataSet(sql, columnNameList, columnTypeList, columnNameIndex,
+        ignoreTimeStamp, queryId, client, sessionId, queryDataSet, Config.DEFAULT_FETCH_SIZE);
   }
 
   public int getFetchSize() {