aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/aggregate/aggregate_with_lambda.sql
blob: 4a10cda985a056e7c1f6250b721792833b5eafb8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
/* syntax version 1 */
/* postgres can not */
USE plato;

$empty = ($list) -> {
    RETURN ListCreate(TypeOf($list[0]));
};

SELECT
    $empty(AGGREGATE_LIST(key))
FROM Input
GROUP BY value;