[ 
https://issues.apache.org/jira/browse/SOLR-15489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Potter resolved SOLR-15489.
-----------------------------------
    Fix Version/s: main (9.0)
       Resolution: Fixed

> 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
>             Fix For: main (9.0)
>
>          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

Reply via email to