zjffdu commented on a change in pull request #3301: ZEPPELIN-3975. Add limit 
local property for SparkInterpreter and JdbcInterpreter
URL: https://github.com/apache/zeppelin/pull/3301#discussion_r255384385
 
 

 ##########
 File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
 ##########
 @@ -721,8 +721,10 @@ private InterpreterResult executeSql(String propertyKey, 
String sql,
         statement = connection.createStatement();
 
         // fetch n+1 rows in order to indicate there's more rows available 
(for large selects)
-        statement.setFetchSize(getMaxResult());
-        statement.setMaxRows(maxRows);
+        statement.setFetchSize(Integer.parseInt(interpreterContext
+                .getLocalProperties().getOrDefault("limit", "" + 
getMaxResult())));
 
 Review comment:
   fixed

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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