aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/compute_range/multiply_limit.sql
blob: a8967ea763480fa6d6c0c8bc2c96a66891fe8176 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* syntax version 1 */
/* postgres can not */
/* dq can not */
/* dqfile can not */
/* yt can not */
pragma warning("disable", "4510");
pragma warning("disable", "1108");

-- single over limit
select YQL::RangeComputeFor(
  Struct<x:String, y:String>,
  ($row) -> ($row.x IN CAST(ListFromRange(0, 10001) AS List<String>)),
  AsTuple(AsAtom("x"), AsAtom("y"))
);


-- multiply over limit
select YQL::RangeComputeFor(
  Struct<x:String, y:String>,
  ($row) -> ($row.x IN CAST(ListFromRange(0, 101) AS List<String>) and $row.y IN CAST(ListFromRange(0, 101) AS List<String>)),
  AsTuple(AsAtom("x"), AsAtom("y"))
);

-- fuzing predicates
-- TODO: currently the result is (-inf, +inf) here. Optimally, it should be [0, +inf)
select YQL::RangeComputeFor(
  Struct<x:Int32>,
  ($row) -> ($row.x IN ListFromRange(0, 20000)),
  AsTuple(AsAtom("x"))
);