aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/aggr_factory/transform_input.sql
blob: 0a92f6d097b09361c597cada97d8bd63917f6c70 (plain) (blame)
1
2
3
4
5
6
7
8
/* syntax version 1 */
/* postgres can not */
$f = AGGREGATION_FACTORY("sum");
$g = AggregateTransformInput($f, ($x)->(cast($x as Int32)));
$h = AggregateTransformInput($f, ($x)->($x * 2));
select ListAggregate([1,2,3], $f);
select ListAggregate(["1","2","3"], $g);
select ListAggregate([1,2,3], $h);