You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/01/04 02:25:31 UTC

[GitHub] [iotdb] Alima777 commented on a change in pull request #2389: show devices limit

Alima777 commented on a change in pull request #2389:
URL: https://github.com/apache/iotdb/pull/2389#discussion_r551090995



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/ShowDevicesPlan.java
##########
@@ -21,15 +21,49 @@
 import org.apache.iotdb.db.metadata.PartialPath;
 
 public class ShowDevicesPlan extends ShowPlan{
+
   private PartialPath path;
+  private int limit = 0;
+  private int offset = 0;
+  private boolean hasLimit;
 
   public ShowDevicesPlan(ShowContentType showContentType, PartialPath path) {
     super(showContentType);
     this.path = path;
   }
 
+  public ShowDevicesPlan(ShowContentType showContentType, PartialPath path, int limit, int offset) {
+    this(showContentType, path);
+    this.limit = limit;
+    this.offset = offset;
+  }
+

Review comment:
       ```suggestion
     public ShowDevicesPlan(ShowContentType showContentType, PartialPath path, int limit, int offset) {
       this(showContentType, path);
       this.offset = offset;
        if (limit == 0) {
             this.limit = fetchSize;
             this.hasLimit = false;
           } else {
             this.hasLimit = true;
           }
     }
   
   ```

##########
File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/ShowDevicesPlan.java
##########
@@ -21,15 +21,49 @@
 import org.apache.iotdb.db.metadata.PartialPath;
 
 public class ShowDevicesPlan extends ShowPlan{
+
   private PartialPath path;
+  private int limit = 0;
+  private int offset = 0;
+  private boolean hasLimit;
 
   public ShowDevicesPlan(ShowContentType showContentType, PartialPath path) {
     super(showContentType);
     this.path = path;
   }
 
+  public ShowDevicesPlan(ShowContentType showContentType, PartialPath path, int limit, int offset) {
+    this(showContentType, path);
+    this.limit = limit;
+    this.offset = offset;
+  }
+

Review comment:
       Why not put the initialization here? :D




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org