You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Juan José Ramos Cassella (Jira)" <ji...@apache.org> on 2019/09/20 15:11:00 UTC

[jira] [Resolved] (GEODE-1929) Specifying ORDER BY in a OQL Query should not require the SELECT to be DISTINCT

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

Juan José Ramos Cassella resolved GEODE-1929.
---------------------------------------------
    Resolution: Not A Problem

I've tested this with the latest Geode version and it works just fine, apparently using {{DISTINCT}} is not a requirement anymore for {{ORDER BY}} to work properly.

> Specifying ORDER BY in a OQL Query should not require the SELECT to be DISTINCT
> -------------------------------------------------------------------------------
>
>                 Key: GEODE-1929
>                 URL: https://issues.apache.org/jira/browse/GEODE-1929
>             Project: Geode
>          Issue Type: Bug
>          Components: querying
>            Reporter: John Blum
>            Assignee: Juan José Ramos Cassella
>            Priority: Major
>
> Currently, when a user writes a sorted OQL query, the user would specify an {{ORDER BY}} clause indicating which object properties to sort on along with the direction of the sort.  Additionally, for some non-apparent reason, Geode also requires the result of the query to be unique (a.k.a. {{DISTINCT}}).
> Therefore, the following query would be considered invalid by Geode...
> {code:sql}
> SELECT * FROM /People p WHERE p.lastname = 'Doe' ORDER BY p.lastname ASC, p.birthDate DESC
> {code}
> To correct this query, a user much specify the {{DISTINCT}} OQL keyword...
> {code:sql}
> SELECT DISTINCT * FROM /People p WHERE p.lastname = 'Doe' ORDER BY p.lastname ASC, p.birthDate DESC
> {code}
> However, sorting has nothing to do with uniqueness as it is still possible to sort results even when they contain duplicates.
> This seems to be a technical limitation in Geode rather than an apparent limitation of data grid technology, which has be inappropriately exposed to the end user.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)