[ 
https://issues.apache.org/jira/browse/DRILL-7048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16800743#comment-16800743
 ] 

ASF GitHub Bot commented on DRILL-7048:
---------------------------------------

vvysotskyi commented on pull request #1714: DRILL-7048: Implement JDBC 
Statement.setMaxRows() with System Option
URL: https://github.com/apache/drill/pull/1714#discussion_r268658212
 
 

 ##########
 File path: 
exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillPreparedStatementImpl.java
 ##########
 @@ -259,4 +261,17 @@ public void setObject(int parameterIndex, Object x, 
SQLType targetSqlType) throw
     checkOpen();
     super.setObject(parameterIndex, x, targetSqlType);
   }
+
+  @Override
+  public void setLargeMaxRows(long maxRowCount) throws SQLException {
+    Statement setMaxStmt = this.connection.createStatement();
+    setMaxStmt.execute("ALTER SESSION SET `" + ExecConstants.QUERY_MAX_ROWS + 
"`="+maxRowCount);
 
 Review comment:
   ```suggestion
       setMaxStmt.execute("ALTER SESSION SET `" + ExecConstants.QUERY_MAX_ROWS 
+ "`=" + maxRowCount);
   ```
 
----------------------------------------------------------------
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:
us...@infra.apache.org


> Implement JDBC Statement.setMaxRows() with System Option
> --------------------------------------------------------
>
>                 Key: DRILL-7048
>                 URL: https://issues.apache.org/jira/browse/DRILL-7048
>             Project: Apache Drill
>          Issue Type: New Feature
>          Components: Client - JDBC, Query Planning & Optimization
>    Affects Versions: 1.15.0
>            Reporter: Kunal Khatua
>            Assignee: Kunal Khatua
>            Priority: Major
>              Labels: doc-impacting
>             Fix For: 1.17.0
>
>
> With DRILL-6960, the webUI will get an auto-limit on the number of results 
> fetched.
> Since more of the plumbing is already there, it makes sense to provide the 
> same for the JDBC client.
> In addition, it would be nice if the Server can have a pre-defined value as 
> well (default 0; i.e. no limit) so that an _admin_ would be able to ensure a 
> max limit on the resultset size as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to