You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Till (JIRA)" <ji...@apache.org> on 2019/04/11 16:51:00 UTC

[jira] [Updated] (ASTERIXDB-2292) Selecting the kth element from a subquery with ORDER BY

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

Till updated ASTERIXDB-2292:
----------------------------
    Affects Version/s: 0.9.4

> Selecting the kth element from a subquery with ORDER BY
> -------------------------------------------------------
>
>                 Key: ASTERIXDB-2292
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2292
>             Project: Apache AsterixDB
>          Issue Type: Improvement
>          Components: COMP - Compiler
>    Affects Versions: 0.9.4
>            Reporter: Ali Alsuliman
>            Assignee: Ali Alsuliman
>            Priority: Major
>              Labels: triaged
>
> (select * from GBU g order by g.name)[k]
> The plan for the above query orders, then listifies the result only to pick the kth element.
> The query should be turned into:
> select * from GBU g order by g.name limit 1 offset k
> This is especially important when k = 0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)