[ https://issues.apache.org/jira/browse/GEODE-1929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Blum updated GEODE-1929: ----------------------------- Description: 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. was: 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. > 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 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 (v6.3.4#6332)