aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/expr/empty_iterator.sql
blob: 0399f810a2cfa521049d73d64a0ec1303d7498c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* syntax version 1 */
/* postgres can not */
USE plato;

$train =
SELECT * FROM Input WHERE key > "900" GROUP BY value;

$method = ($stream) -> {
    $func = Callable(
        CallableType(0, TypeOf($stream), TypeOf($stream)),
        ($_1) -> { return $_1; }
    );
    RETURN $func($stream);
};

$prediction =
    PROCESS $train
    USING $method(TableRows());

SELECT * FROM $prediction;