summaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/aggr_factory/multi_tuple_nulls.yql
blob: 0c730a1792d2fae350698e6776fd18cae9c4ad57 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$data = AsList(
    AsStruct(AsTuple(1.0, 2) as x),
    AsStruct(AsTuple(3.0, 4) as x),
    AsStruct(AsTuple(NULL, NULL) as x),
    AsStruct(AsTuple(2.0, 3) as x),
);

SELECT  
    MULTI_AGGREGATE_BY(x, AggregationFactory("agg_list")),
    MULTI_AGGREGATE_BY(x, AggregationFactory("avg")),
    MULTI_AGGREGATE_BY(x, AggregationFactory("count")),
FROM
    AS_TABLE($data);

SELECT
    MULTI_AGGREGATE_BY(x, AggregationFactory("agg_list")),
    MULTI_AGGREGATE_BY(x, AggregationFactory("avg")),
    MULTI_AGGREGATE_BY(x, AggregationFactory("count")),
FROM
    (SELECT * FROM AS_TABLE($data) LIMIT 0);