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/05/13 07:54:49 UTC

[GitHub] [iotdb] jixuan1989 commented on a change in pull request #3181: Implement some JDBC methods to support DataGrip

jixuan1989 commented on a change in pull request #3181:
URL: https://github.com/apache/iotdb/pull/3181#discussion_r631634044



##########
File path: jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java
##########
@@ -581,18 +590,21 @@ public void setMaxFieldSize(int arg0) throws SQLException {
 
   @Override
   public int getMaxRows() throws SQLException {
-    throw new SQLException("Not support getMaxRows");
+    return this.maxRows;
   }
 
   @Override
   public void setMaxRows(int num) throws SQLException {
-    throw new SQLException(
-        "Not support getMaxRows" + ". Please use the LIMIT clause in a query instead.");
+    checkConnection("setMaxRows");
+    if (num <= 0) {
+      throw new SQLException(String.format("maxRows %d must be > 0!", num));
+    }
+    this.maxRows = num;
   }
 
   @Override
   public boolean getMoreResults() throws SQLException {
-    throw new SQLException("Not support getMoreResults");
+    return false;

Review comment:
       sounds incorrect...
   `getMoreResults` should return false either:
   1. the number of fetched rows >= maxRows
   2. no more results from resultSet.




-- 
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