imay commented on a change in pull request #1531: Show load statement support 
offset
URL: https://github.com/apache/incubator-doris/pull/1531#discussion_r306167202
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/qe/ShowExecutor.java
 ##########
 @@ -740,8 +740,15 @@ private void handleShowLoad() throws AnalysisException {
 
         // filter by limit
         long limit = showStmt.getLimit();
-        if (limit != -1L && limit < rows.size()) {
-            rows = rows.subList(0, (int) limit);
+        long offset = showStmt.getOffset() == -1L ? 0 : showStmt.getOffset();
+        if (offset >= rows.size()) {
+            rows = Lists.newArrayList();
+        } else if(limit != -1L) {
 
 Review comment:
   ```suggestion
           } else if (limit != -1L) {
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to