OpenSearch/x-pack/plugin/sql
Marios Trivyzas 4710a7472f
SQL: Implement FIRST/LAST aggregate functions (#37936)
FIRST and LAST can be used with one argument and work similarly to MIN
and MAX but they are implemented using a Top Hits aggregation and
therefore can also operate on keyword fields. When a second argument is
provided then they return the first/last value of the first arg when its
values are ordered ascending/descending (respectively) by the values of
the second argument. Currently because of the usage of a Top Hits
aggregation FIRST and LAST cannot be used in the HAVING clause of a
GROUP BY query to filter on the results of the aggregation.

Closes: #35639
2019-01-31 16:33:05 +02:00
..
jdbc SQL: Added SSL configuration options tests (#37875) 2019-01-31 10:52:49 +02:00
qa SQL: Implement FIRST/LAST aggregate functions (#37936) 2019-01-31 16:33:05 +02:00
sql-action Use mappings to format doc-value fields by default. (#30831) 2019-01-30 10:31:51 +01:00
sql-cli SQL: Return Intervals in SQL format for CLI (#37602) 2019-01-22 14:55:28 +02:00
sql-client SQL: Added SSL configuration options tests (#37875) 2019-01-31 10:52:49 +02:00
sql-proto SQL: Return Intervals in SQL format for CLI (#37602) 2019-01-22 14:55:28 +02:00
src SQL: Implement FIRST/LAST aggregate functions (#37936) 2019-01-31 16:33:05 +02:00
build.gradle SQL: [Tests] Fix and enable internalClusterTests (#37300) 2019-01-11 22:43:17 +02:00