Open luigidellaquila opened 2 years ago
Pinging @elastic/es-ql (Team:QL)
Hello, @luigidellaquila. It's been about 9 months since you wrote an issue. Do you have any additional comments on the issue?
If you want to find the maximum value for all documents How about querying only one top value with "LIMIT 1", after executing a SELECT statement with c and specific fields in the GROUP BY clause?
ex)
SELECT 1 as c, MAX(salary) FROM person GROUP BY c, salary ORDER BY MAX(salary) desc LIMIT 1
If the issue has already been resolved, please leave a comment. Thank you.
Pinging @elastic/es-analytical-engine (Team:Analytics)
The following query
crashes the server with
The following queries work as expected
so the problem seems to be due to the mix of GROUP BY constant and ORDER BY aggregation with no further grouping.
The query is uncommon, the ORDER BY is meaningless in this context, since it always returns only one result. Still, the outcome is a server crash, so the problem deserves some attention.
Steps to reproduce
Further references
This issue could be related to #84490 and #74064, probably related to query optimizations.
#84574 seems to fix it