aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/lineage/if_struct.sql
blob: c8e9b16f0c907f0ee4c4296d814e7adb1263d765 (plain) (blame)
1
2
3
4
insert into plato.Output
select * from (select IF(key == "foo", CombineMembers(RemoveMembers(LAG(data) OVER w, ["key"]), ChooseMembers(data, ["key"])), data) from 
    (select TableRow() as data, key, value from plato.Input)
window w as (partition by key)) flatten columns;