kkhatua commented on a change in pull request #1714: DRILL-7048: Implement JDBC 
Statement.setMaxRows() with System Option
URL: https://github.com/apache/drill/pull/1714#discussion_r268800813
 
 

 ##########
 File path: 
exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillStatementImpl.java
 ##########
 @@ -270,4 +271,10 @@ public void setResultSet(AvaticaResultSet resultSet) {
   public void setUpdateCount(int value) {
     updateCount = value;
   }
+
+  @Override
+  public void setLargeMaxRows(long maxRowCount) throws SQLException {
+    execute("ALTER SESSION SET `" + ExecConstants.QUERY_MAX_ROWS + 
"`="+maxRowCount);
+    this.maxRowCount = maxRowCount;
 
 Review comment:
   We need this here to ensure that when `getLargeMaxRows()` is called, we are 
reading it back from the value that was set using `setLargeMaxRows()`. Avatica 
only holds the value that has been set.

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


With regards,
Apache Git Services

Reply via email to