You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "John Blum (JIRA)" <ji...@apache.org> on 2016/09/23 17:45:21 UTC
[jira] [Created] (GEODE-1929) Specifying ORDER BY in a OQL Query
should not require the SELECT to be DISTINCT
John Blum created GEODE-1929:
--------------------------------
Summary: 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
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 considered to be 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
(v6.3.4#6332)