[ https://issues.apache.org/jira/browse/SOLR-15489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17371733#comment-17371733 ]
ASF subversion and git services commented on SOLR-15489: -------------------------------------------------------- Commit 0907fff65cb236897731972da49b7118a8c40a09 in solr's branch refs/heads/main from Timothy Potter [ https://gitbox.apache.org/repos/asf?p=solr.git;h=0907fff ] SOLR-15489: Implement OFFSET & FETCH for LIMIT SQL queries (#191) > Solr SQL should respect OFFSET and FETCH criteria when used with ORDER BY > ------------------------------------------------------------------------- > > Key: SOLR-15489 > URL: https://issues.apache.org/jira/browse/SOLR-15489 > Project: Solr > Issue Type: Improvement > Components: Parallel SQL > Reporter: Timothy Potter > Assignee: Timothy Potter > Priority: Major > Labels: RobustSQL > Time Spent: 1.5h > Remaining Estimate: 0h > > Tried a simple example over a collection containing 11 docs with id's (1-11) > {code} > SELECT id FROM $ALIAS ORDER BY id DESC OFFSET 5 FETCH NEXT 5 ROWS ONLY > {code} > Got back the first page (11,10,9,8,7) vs. the second (6,5,4,3,2), i.e. it's > just doing LIMIT 5 with offset 0 vs. respecting the FETCH with OFFSET. > From the Calcite grammar: > {code} > [ ORDER BY orderItem [, orderItem ]* ] > [ LIMIT [ start, ] { count | ALL } ] > [ OFFSET start { ROW | ROWS } ] > [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ] > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org