You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Timothy Potter (Jira)" <ji...@apache.org> on 2021/06/21 18:26:00 UTC
[jira] [Updated] (SOLR-15489) Solr SQL should respect OFFSET and
FETCH criteria when used with ORDER BY
[ https://issues.apache.org/jira/browse/SOLR-15489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Potter updated SOLR-15489:
----------------------------------
Description:
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}
was:
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.
> 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
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Parallel SQL
> Reporter: Timothy Potter
> Assignee: Timothy Potter
> Priority: Major
> Labels: RobustSQL
>
> 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-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org