OpenSearch/x-pack/plugin/sql
Marios Trivyzas 3c73602524 SQL: Fix wrong results when sorting on aggregate (#43154)
- Previously, when shorting on an aggregate function the bucket
processing ended early when the explicit (LIMIT XXX) or the impliciti
limit of 512 was reached. As a consequence, only a set of grouping
buckets was processed and the results returned didn't reflect the global
ordering.

- Previously, the priority queue shorting method had an inverse
comparison check and the final response from the priority queue was also
returned in the inversed order because of the calls to the `pop()`
method.

Fixes: #42851

(cherry picked from commit 19909edcfdf5792b38c1363b07379783ebd0e6c4)
2019-06-13 21:59:20 +02:00
..
jdbc [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00
qa SQL: Fix wrong results when sorting on aggregate (#43154) 2019-06-13 21:59:20 +02:00
sql-action [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00
sql-cli [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00
sql-client [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00
sql-proto [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00
src SQL: Fix wrong results when sorting on aggregate (#43154) 2019-06-13 21:59:20 +02:00
build.gradle [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00