summaryrefslogtreecommitdiffstats
path: root/yql/essentials/udfs/common/yson2/test/cases/MutTryDown.sql
blob: 06974a7c5d64e38fe5e018033bf3a342b1e94d29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
SELECT 
    Block(($x)->{
        $m = Udf(Yson::MutCreate, $x as Depends)();
        $m, $ok = Yson::MutTryDown($m, 'foo');
        $m = Ensure($m, not $ok);
        $m = Yson::MutDownOrCreate($m, 'foo');
        $m = Yson::MutUpsert($m, '1'y);
        $m = Yson::MutRewind($m);
        $m, $ok = Yson::MutTryDown($m, 'foo');
        return LinearDestroy($ok, $m);
    })