blob: 825f9e89219f5be86aa4e6888f48dc0a173a2048 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/* syntax version 1 */
/* postgres can not */
/* yt can not */
pragma warning("disable", "4510");
$opt_type = Struct<x:Int32?, y:Int32?, z:String?, t:String?>;
$xy_keys = AsTuple(AsAtom("x"), AsAtom("y"));
$range_for = ($pred) -> (YQL::RangeComputeFor($opt_type, $pred, $xy_keys));
$pred1 = ($row) -> (($row.x + $row.y > 0) ?? false);
$pred2 = ($row) -> (($row.x > 0 or $row.y > 0) ?? false);
$pred3 = ($row) -> (($row.x > 0 or $row.z == "test") ?? false);
select
$range_for($pred1) is null,
$range_for($pred2) is null,
$range_for($pred3) is null,
;
|